From 6aec1d1f26b3e5e36fc99e6ab61487f4705783e4 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 15 Jan 2012 22:38:54 +0000 Subject: [PATCH] Add a hack to the animsounds DEF token parsing to not wrongly emit an error. git-svn-id: https://svn.eduke32.com/eduke32@2258 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index a3c30d5ff..96a97dbac 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -8380,7 +8380,14 @@ static int32_t parsedefinitions_game(scriptfile *script, int32_t preload) continue; } - // XXX: ugly, will produce error when it encounters the closing '}' + // HACK: we've reached the end of the list + // (hack because it relies on knowledge of + // how scriptfile_* preprocesses the text) + if (animsoundsend - script->textptr == 1) + break; + + // would produce error when it encounters the closing '}' + // without the above hack if (scriptfile_getnumber(script, &framenum)) break; bad=1;