From c26149fd1f15b81d69b7592c77b5a2a66ea3c810 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 12 Apr 2015 08:06:51 +0000 Subject: [PATCH] Defs: Expand use of check_tile(). git-svn-id: https://svn.eduke32.com/eduke32@5137 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/defs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/src/defs.c b/polymer/eduke32/build/src/defs.c index 096b26dc2..fc0287f73 100644 --- a/polymer/eduke32/build/src/defs.c +++ b/polymer/eduke32/build/src/defs.c @@ -531,7 +531,8 @@ static int32_t defsparser(scriptfile *script) int32_t tile, tmp; if (scriptfile_getsymbol(script,&tile)) break; - if ((unsigned)tile >= MAXUSERTILES) break; + if (check_tile("setuptile", tile, script, cmdtokptr)) + break; if (scriptfile_getsymbol(script,&tmp)) break; // XXX h_xsize[tile] = tmp; if (scriptfile_getsymbol(script,&tmp)) break; @@ -741,7 +742,8 @@ static int32_t defsparser(scriptfile *script) if (scriptfile_getsymbol(script,&xsiz)) break; if (scriptfile_getsymbol(script,&ysiz)) break; - if ((unsigned)tile >= (unsigned)MAXUSERTILES) break; + if (check_tile("dummytile", tile, script, cmdtokptr)) + break; if ((int16_t) xsiz == 0 || (int16_t) ysiz == 0) { @@ -796,7 +798,8 @@ static int32_t defsparser(scriptfile *script) if (scriptfile_getsymbol(script,&tile)) break; - if ((unsigned)tile >= (unsigned)MAXUSERTILES) break; + if (check_tile("undefinetile", tile, script, cmdtokptr)) + break; undefinetile(tile);