Bug 1431866 - Avoid risk of undefined behavior in gfxFontStyle::Hash() calculation. r=jrmuizel

This commit is contained in:
Jonathan Kew 2018-01-24 17:42:30 +00:00
parent 7ff4c1c33d
commit 6856ae796f

View File

@ -185,7 +185,7 @@ struct gfxFontStyle {
PLDHashNumber Hash() const {
return ((style + (systemFont << 7) +
(weight << 8)) + uint32_t(size*1000) + uint32_t(sizeAdjust*1000)) ^
(weight << 8)) + uint32_t(size*1000) + int32_t(sizeAdjust*1000)) ^
nsRefPtrHashKey<nsAtom>::HashKey(language);
}