Fix a bug that showed up in valgrind

git-svn-id: https://svn.eduke32.com/eduke32@846 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-07-09 08:54:54 +00:00
parent 6616dbd31b
commit eece4e2b75

View file

@ -501,7 +501,7 @@ int movesprite(int spritenum, int xchange, int ychange, int zchange, unsigned in
{ {
sprite[spritenum].x = oldx; sprite[spritenum].x = oldx;
sprite[spritenum].y = oldy; sprite[spritenum].y = oldy;
if (sector[dasectnum].lotag == 1 && sprite[spritenum].picnum == LIZMAN) if (dasectnum >= 0 && sector[dasectnum].lotag == 1 && sprite[spritenum].picnum == LIZMAN)
sprite[spritenum].ang = (TRAND&2047); sprite[spritenum].ang = (TRAND&2047);
else if ((hittype[spritenum].temp_data[0]&3) == 1 && sprite[spritenum].picnum != COMMANDER) else if ((hittype[spritenum].temp_data[0]&3) == 1 && sprite[spritenum].picnum != COMMANDER)
sprite[spritenum].ang = (TRAND&2047); sprite[spritenum].ang = (TRAND&2047);