From 0d5b933bb3043bc69dbe8fb5939124bfe92619bb Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 12 Apr 2015 08:07:59 +0000 Subject: [PATCH] Fix omission of modules when parsing game-side defs. git-svn-id: https://svn.eduke32.com/eduke32@5141 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/astub.c | 9 +++++---- polymer/eduke32/source/game.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index a3162dd1c..dfbf99b8e 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -9217,14 +9217,15 @@ int32_t loaddefinitions_game(const char *fn, int32_t preload) UNREFERENCED_PARAMETER(preload); script = scriptfile_fromfile(fn); - if (!script) return -1; - - parsegroupfiles(script); + if (script) + parsegroupfiles(script); for (i=0; i < g_defModulesNum; ++i) parsegroupfiles_include(g_defModules[i], NULL, "null"); - scriptfile_close(script); + if (script) + scriptfile_close(script); + scriptfile_clearsymbols(); return 0; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 1d9a44300..399bffb09 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -9824,14 +9824,15 @@ int32_t loaddefinitions_game(const char *fn, int32_t preload) int32_t i; script = scriptfile_fromfile(fn); - if (!script) return -1; - - parsedefinitions_game(script, preload); + if (script) + parsedefinitions_game(script, preload); for (i=0; i < g_defModulesNum; ++i) parsedefinitions_game_include(g_defModules[i], NULL, "null", preload); - scriptfile_close(script); + if (script) + scriptfile_close(script); + scriptfile_clearsymbols(); return 0;