mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
engine.c: in wallscan(), fix oob of umost[] and dmost[] when x2 == xdim-1.
Analogously treat maskwallscan() and transmaskwallscan(), although I could not get the respective accesses to be oob, too. git-svn-id: https://svn.eduke32.com/eduke32@4757 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7275152b86
commit
e919dee00f
1 changed files with 8 additions and 4 deletions
|
@ -2790,7 +2790,7 @@ static void maskwallscan(int32_t x1, int32_t x2, int32_t saturatevplc)
|
||||||
|
|
||||||
|
|
||||||
x = x1;
|
x = x1;
|
||||||
while ((startumost[x+windowx1] > startdmost[x+windowx1]) && (x <= x2))
|
while ((x <= x2) && (startumost[x+windowx1] > startdmost[x+windowx1]))
|
||||||
x++;
|
x++;
|
||||||
|
|
||||||
p = x+frameoffset;
|
p = x+frameoffset;
|
||||||
|
@ -3775,7 +3775,9 @@ static void wallscan(int32_t x1, int32_t x2,
|
||||||
if (globalshiftval < 0)
|
if (globalshiftval < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (x2 >= xdim) x2 = xdim-1;
|
if (x2 >= xdim)
|
||||||
|
x2 = xdim-1;
|
||||||
|
assert((unsigned)x1 < (unsigned)xdim);
|
||||||
|
|
||||||
tsiz = tilesiz[globalpicnum];
|
tsiz = tilesiz[globalpicnum];
|
||||||
|
|
||||||
|
@ -3793,7 +3795,8 @@ static void wallscan(int32_t x1, int32_t x2,
|
||||||
|
|
||||||
|
|
||||||
x = x1;
|
x = x1;
|
||||||
while ((umost[x] > dmost[x]) && (x <= x2)) x++;
|
while ((x <= x2) && (umost[x] > dmost[x]))
|
||||||
|
x++;
|
||||||
|
|
||||||
#ifdef NONPOW2_YSIZE_ASM
|
#ifdef NONPOW2_YSIZE_ASM
|
||||||
if (globalshiftval==0)
|
if (globalshiftval==0)
|
||||||
|
@ -4023,7 +4026,8 @@ static void transmaskwallscan(int32_t x1, int32_t x2, int32_t saturatevplc)
|
||||||
setuptvlineasm(globalshiftval, saturatevplc);
|
setuptvlineasm(globalshiftval, saturatevplc);
|
||||||
|
|
||||||
x = x1;
|
x = x1;
|
||||||
while ((startumost[x+windowx1] > startdmost[x+windowx1]) && (x <= x2)) x++;
|
while ((x <= x2) && (startumost[x+windowx1] > startdmost[x+windowx1]))
|
||||||
|
x++;
|
||||||
|
|
||||||
#ifndef ENGINE_USING_A_C
|
#ifndef ENGINE_USING_A_C
|
||||||
if (globalshiftval==0)
|
if (globalshiftval==0)
|
||||||
|
|
Loading…
Reference in a new issue