diff options
author | Simon Howard | 2014-10-18 20:33:30 -0400 |
---|---|---|
committer | Simon Howard | 2014-10-18 20:33:30 -0400 |
commit | 5914e16076339ef487094dba8be67eed21b0a811 (patch) | |
tree | 36c72e60e176f495bd391dfc6da09cbbb60e4acc /src/doom/deh_bexstr.c | |
parent | 2ab317c4b7c304bc624f803e7b5763ab27f39f7b (diff) | |
download | chocolate-doom-5914e16076339ef487094dba8be67eed21b0a811.tar.gz chocolate-doom-5914e16076339ef487094dba8be67eed21b0a811.tar.bz2 chocolate-doom-5914e16076339ef487094dba8be67eed21b0a811.zip |
dehacked: Allow override of string replacements.
If loading two dehacked patches and both replace the same string,
the second replacement should override the first. Change the API
function DEH_AddStringReplacement so that the from_text and to_text
are implicitly duplicated, and we can free to_text and replace
it later if we subsequently change it to something else.
Diffstat (limited to 'src/doom/deh_bexstr.c')
-rw-r--r-- | src/doom/deh_bexstr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doom/deh_bexstr.c b/src/doom/deh_bexstr.c index e29b71dc..ac3ab651 100644 --- a/src/doom/deh_bexstr.c +++ b/src/doom/deh_bexstr.c @@ -360,7 +360,7 @@ static void DEH_BEXStrParseLine(deh_context_t *context, char *line, void *tag) { if (!strcmp(bex_stringtable[i].macro, variable_name)) { - DEH_AddStringReplacement(bex_stringtable[i].string, strdup(value)); + DEH_AddStringReplacement(bex_stringtable[i].string, value); } } } |