From eece4e2b75a91de728c667574269f7b40e0c71a2 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 9 Jul 2008 08:54:54 +0000 Subject: [PATCH] Fix a bug that showed up in valgrind git-svn-id: https://svn.eduke32.com/eduke32@846 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 1ef750435..83ce24530 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -501,7 +501,7 @@ int movesprite(int spritenum, int xchange, int ychange, int zchange, unsigned in { sprite[spritenum].x = oldx; 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); else if ((hittype[spritenum].temp_data[0]&3) == 1 && sprite[spritenum].picnum != COMMANDER) sprite[spritenum].ang = (TRAND&2047);