mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Mapster32: fix possible integer overflow in loopinside().
This could happen when building outside the "classic" grid limits and would then lead to e.g. incorrect loop assignment on sector splitting. Bug reported by MetHy. git-svn-id: https://svn.eduke32.com/eduke32@4572 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3aaf167d6b
commit
63916ee8d1
1 changed files with 1 additions and 1 deletions
|
@ -8854,7 +8854,7 @@ int32_t loopinside(int32_t x, int32_t y, int16_t startwall)
|
|||
}
|
||||
|
||||
if (y1 <= y && y < y2)
|
||||
if (x1*(y-y2)+x2*(y1-y) <= x*(y1-y2))
|
||||
if ((uint64_t)x1*(y-y2) + (uint64_t)x2*(y1-y) <= (uint64_t)x*(y1-y2))
|
||||
cnt ^= 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue