From 93c749f2de9c3326077042d6a3079145960ddd8d Mon Sep 17 00:00:00 2001 From: helixhorned Date: Wed, 10 Nov 2010 21:11:55 +0000 Subject: [PATCH] a.m32 corruption checker: also handle out-of-range picnum git-svn-id: https://svn.eduke32.com/eduke32@1726 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/samples/a.m32 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/polymer/eduke32/samples/a.m32 b/polymer/eduke32/samples/a.m32 index 6a0cded5c..41b8a390d 100644 --- a/polymer/eduke32/samples/a.m32 +++ b/polymer/eduke32/samples/a.m32 @@ -79,6 +79,7 @@ definequote 23 WALL[%d].POINT2=%d out of range: sector[%d].wallptr=%d, endwall=% definequote 24 WALL[%d].NEXTWALL=%d out of range: numwalls=%d!!! definequote 25 WALL[%d].NEXTSECTOR=%d out of range: numsectors=%d!!! definequote 26 SPRITE[%d].SECTNUM=%d. Expect problems! +definequote 27 SPRITE[%d].PICNUM=%d out of range, resetting to 0 define PRSCALE 1000 define MAXSPECULAR 100000 @@ -1075,6 +1076,13 @@ defstate corruptchk qsprintf TQUOTE 26 i .sectnum quote TQUOTE printmessage16 TQUOTE } + + ifge .picnum 0 ifl .picnum MAXTILES nullop else + { + qsprintf TQUOTE 27 i .picnum + quote TQUOTE printmessage16 TQUOTE + set .picnum 0 + } } ends