mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Initialize prlights[lighti].flags.invalidate with 0 when calling
polymer_addlight(). I have no idea whether it's the 'right' thing, but it fixes this: Conditional jump or move depends on uninitialised value(s) at polymer_updatelights (polymer.c:5090) by polymer_drawrooms (polymer.c:938) . . . Uninitialised value was created by a stack allocation at loadmaphack (engine.c:9482) Fix another uninitialized access when rendering jpegs. git-svn-id: https://svn.eduke32.com/eduke32@2069 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6cfdc2b376
commit
48c49e751f
2 changed files with 8 additions and 1 deletions
|
@ -1474,6 +1474,8 @@ int16_t polymer_addlight(_prlight* light)
|
||||||
prlights[lighti].flags.isinview = 0;
|
prlights[lighti].flags.isinview = 0;
|
||||||
prlights[lighti].flags.active = 1;
|
prlights[lighti].flags.active = 1;
|
||||||
|
|
||||||
|
prlights[lighti].flags.invalidate = 0;
|
||||||
|
|
||||||
prlights[lighti].planecount = 0;
|
prlights[lighti].planecount = 0;
|
||||||
prlights[lighti].planelist = NULL;
|
prlights[lighti].planelist = NULL;
|
||||||
|
|
||||||
|
|
|
@ -1708,7 +1708,12 @@ static int32_t gloadtile_hi(int32_t dapic,int32_t dapalnum, int32_t facen, hicre
|
||||||
if ((filh = kopen4load(fn, 0)) < 0) return -1;
|
if ((filh = kopen4load(fn, 0)) < 0) return -1;
|
||||||
|
|
||||||
picfil = (char *)Bmalloc(picfillen+1); if (!picfil) { kclose(filh); return 1; }
|
picfil = (char *)Bmalloc(picfillen+1); if (!picfil) { kclose(filh); return 1; }
|
||||||
kread(filh, picfil, picfillen);
|
if (kread(filh, picfil, picfillen) != picfillen)
|
||||||
|
initprintf("warning: didn't fully read %s\n", fn);
|
||||||
|
// prevent
|
||||||
|
// Conditional jump or move depends on uninitialised value(s)
|
||||||
|
// at kpegrend (kplib.c:1655)
|
||||||
|
picfil[picfillen] = 0;
|
||||||
kclose(filh);
|
kclose(filh);
|
||||||
|
|
||||||
// tsizx/y = replacement texture's natural size
|
// tsizx/y = replacement texture's natural size
|
||||||
|
|
Loading…
Reference in a new issue