From 4d8071e6b3ddee296b5740315c4f82377818fc62 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 1 Dec 2013 18:27:55 +0000 Subject: [PATCH] defs.c: in check_tile(), pass 'tile' by value. git-svn-id: https://svn.eduke32.com/eduke32@4186 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/defs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/polymer/eduke32/build/src/defs.c b/polymer/eduke32/build/src/defs.c index d6d7f1b9a..7914f4715 100644 --- a/polymer/eduke32/build/src/defs.c +++ b/polymer/eduke32/build/src/defs.c @@ -156,10 +156,10 @@ static int32_t check_tile_range(const char *defcmd, int32_t *tilebeg, int32_t *t return 0; } -static int32_t check_tile(const char *defcmd, int32_t *tile, const scriptfile *script, +static int32_t check_tile(const char *defcmd, int32_t tile, const scriptfile *script, const char *cmdtokptr) { - if ((unsigned)*tile >= MAXTILES) + if ((unsigned)tile >= MAXTILES) { initprintf("Error: %s: Invalid tile number on line %s:%d\n", defcmd, script->filename, scriptfile_getlinum(script,cmdtokptr)); @@ -655,7 +655,7 @@ static int32_t defsparser(scriptfile *script) if (xsiz <= 0 || ysiz <= 0) // XXX: kpzload isn't robust against that! break; - if (check_tile("importtile", &tile, script, cmdtokptr)) + if (check_tile("importtile", tile, script, cmdtokptr)) break; set_tilesiz(tile, xsiz, ysiz); @@ -1401,7 +1401,7 @@ static int32_t defsparser(scriptfile *script) case T_TILE: scriptfile_getsymbol(script,&tilex); - if (check_tile("voxel", &tilex, script, voxeltokptr)) + if (check_tile("voxel", tilex, script, voxeltokptr)) break; tiletovox[tilex] = lastvoxid; @@ -1949,7 +1949,7 @@ static int32_t defsparser(scriptfile *script) { r1 = r0; - if (check_tile("undefmodel", &r0, script, cmdtokptr)) + if (check_tile("undefmodel", r0, script, cmdtokptr)) break; } #ifdef USE_OPENGL @@ -1968,7 +1968,7 @@ static int32_t defsparser(scriptfile *script) if (scriptfile_getsymbol(script,&r0)) break; - if (check_tile("undefmodelof", &r0, script, cmdtokptr)) + if (check_tile("undefmodelof", r0, script, cmdtokptr)) break; // XXX: See comment of md_undefinemodel() @@ -2004,7 +2004,7 @@ static int32_t defsparser(scriptfile *script) { r1 = r0; - if (check_tile("undeftexture", &r0, script, cmdtokptr)) + if (check_tile("undeftexture", r0, script, cmdtokptr)) break; }