mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Patch up out-of-bounds access in some voxel drawing code.
git-svn-id: https://svn.eduke32.com/eduke32@2181 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
46ed3313e7
commit
df94c55eab
1 changed files with 4 additions and 1 deletions
|
@ -5082,7 +5082,10 @@ static void drawvox(int32_t dasprx, int32_t daspry, int32_t dasprz, int32_t dasp
|
||||||
rx -= lx;
|
rx -= lx;
|
||||||
|
|
||||||
l1 = distrecip[(ny-yoff)>>14];
|
l1 = distrecip[(ny-yoff)>>14];
|
||||||
l2 = distrecip[(ny+yoff)>>14];
|
// FIXME! AMCTC RC2/beta shotgun voxel
|
||||||
|
// (e.g. training map right after M16 shooting):
|
||||||
|
l2 = clamp((ny+yoff)>>14, 0, 65535);
|
||||||
|
l2 = distrecip[l2];
|
||||||
for (; voxptr<voxend; voxptr+=voxptr[1]+3)
|
for (; voxptr<voxend; voxptr+=voxptr[1]+3)
|
||||||
{
|
{
|
||||||
j = (voxptr[0]<<15)-syoff;
|
j = (voxptr[0]<<15)-syoff;
|
||||||
|
|
Loading…
Reference in a new issue