commit c09b386e1f3cb3518b22c440d6fb7c081ff3aa0b
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Mon Feb 8 19:15:32 2010 +0000
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Mon Feb 8 19:15:32 2010 +0000
Only call InitializeSections() when a dehacked patch is actually loaded.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1863
---
src/deh_main.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/deh_main.c b/src/deh_main.c
index 3f0a6f29..75934087 100644
--- a/src/deh_main.c
+++ b/src/deh_main.c
@@ -39,6 +39,8 @@
extern deh_section_t *deh_section_types[];
extern char *deh_signatures[];
+static boolean deh_initialized = false;
+
// If true, we can do long string replacements.
boolean deh_allow_long_strings = false;
@@ -322,6 +324,12 @@ int DEH_LoadFile(char *filename)
{
deh_context_t *context;
+ if (!deh_initialized)
+ {
+ InitializeSections();
+ deh_initialized = true;
+ }
+
printf(" loading %s\n", filename);
context = DEH_OpenFile(filename);
@@ -346,8 +354,6 @@ void DEH_Init(void)
char *filename;
int p;
- InitializeSections();
-
//!
// @category mod
//