Bug 1228314 - added static_cast<int64> in order to avoid overflow. r=seth

MozReview-Commit-ID: KY3qpIlzE5K

--HG--
extra : rebase_source : a716abcb496c9923318f58d21250b6c13182add0
This commit is contained in:
Bogdan Postelnicu 2016-01-18 17:23:23 +02:00
Родитель b700af6edd
Коммит 3627cdff1f
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -327,7 +327,8 @@ public:
// Compare sizes. We use an area-based heuristic here instead of computing a
// truly optimal answer, since it seems very unlikely to make a difference
// for realistic sizes.
int64_t idealArea = idealKey.Size().width * idealKey.Size().height;
int64_t idealArea = static_cast<int64_t>(idealKey.Size().width) *
static_cast<int64_t>(idealKey.Size().height);
int64_t surfaceArea = aSurfaceKey.Size().width * aSurfaceKey.Size().height;
int64_t bestMatchArea =
bestMatchKey.Size().width * bestMatchKey.Size().height;