mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Prevent an (unlikely) integer overflow in neartag with huge switch sprites.
git-svn-id: https://svn.eduke32.com/eduke32@2641 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7cd2c19801
commit
8ea5b89be6
1 changed files with 2 additions and 2 deletions
|
@ -11592,8 +11592,8 @@ void neartag(int32_t xs, int32_t ys, int32_t zs, int16_t sectnum, int16_t ange,
|
|||
offx = scale(vx,topu,bot);
|
||||
offy = scale(vy,topu,bot);
|
||||
dist = offx*offx + offy*offy;
|
||||
i = (tilesizx[spr->picnum]*spr->xrepeat); i *= i;
|
||||
if (dist <= (i>>7))
|
||||
i = (tilesizx[spr->picnum]*spr->xrepeat);
|
||||
if (dist <= mulscale7(i,i))
|
||||
{
|
||||
intx = xs + scale(vx,topt,bot);
|
||||
inty = ys + scale(vy,topt,bot);
|
||||
|
|
Loading…
Reference in a new issue