Fix integer overflow identified by -fsanitize=integer

This commit is contained in:
Eric Fischer
2016-12-13 16:19:38 -08:00
parent ce3ffee8ff
commit af3d48e5b3
2 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -1376,8 +1376,8 @@ drawvec stairstep(drawvec &geom, int z, int detail) {
}
for (size_t i = 0; i < out.size(); i++) {
out[i].x <<= (32 - detail - z);
out[i].y <<= (32 - detail - z);
out[i].x *= 1 << (32 - detail - z);
out[i].y *= 1 << (32 - detail - z);
}
return out;