summaryrefslogtreecommitdiff
path: root/src/hexen/p_acs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hexen/p_acs.c')
-rw-r--r--src/hexen/p_acs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/hexen/p_acs.c b/src/hexen/p_acs.c
index 0cd85219..9ab86160 100644
--- a/src/hexen/p_acs.c
+++ b/src/hexen/p_acs.c
@@ -342,11 +342,13 @@ void P_LoadACScripts(int lump)
}
}
ACStringCount = *buffer++;
- ACStrings = (char **) buffer;
- for (i = 0; i < ACStringCount; i++)
+ ACStrings = Z_Malloc(ACStringCount * sizeof(char *), PU_LEVEL, NULL);
+
+ for (i=0; i<ACStringCount; ++i)
{
- ACStrings[i] += (int) ActionCodeBase;
+ ACStrings[i] = (char *) ActionCodeBase + buffer[i];
}
+
memset(MapVars, 0, sizeof(MapVars));
}