ref: c09b386e1f3cb3518b22c440d6fb7c081ff3aa0b
parent: b83a1ed02c6f22ebbced208b02bb59ff94bed941
author: Simon Howard <[email protected]>
date: Mon Feb 8 14:15:32 EST 2010
Only call InitializeSections() when a dehacked patch is actually loaded. Subversion-branch: /branches/raven-branch Subversion-revision: 1863
--- 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 @@
{
deh_context_t *context;
+ if (!deh_initialized)
+ {
+ InitializeSections();
+ deh_initialized = true;
+ }
+
printf(" loading %s\n", filename);
context = DEH_OpenFile(filename);
@@ -345,8 +353,6 @@
{
char *filename;
int p;
-
- InitializeSections();
//!
// @category mod