diff options
Diffstat (limited to 'src/strgen/strgen_base.cpp')
-rw-r--r-- | src/strgen/strgen_base.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/strgen/strgen_base.cpp b/src/strgen/strgen_base.cpp index 27c76631c..ef30a4c8a 100644 --- a/src/strgen/strgen_base.cpp +++ b/src/strgen/strgen_base.cpp @@ -40,7 +40,7 @@ static const CmdStruct *ParseCommandString(const char **str, char *param, int *a * @param next The next chained case. */ Case::Case(int caseidx, const char *string, Case *next) : - caseidx(caseidx), string(strdup(string)), next(next) + caseidx(caseidx), string(stredup(string)), next(next) { } @@ -59,7 +59,7 @@ Case::~Case() * @param line The line this string was found on. */ LangString::LangString(const char *name, const char *english, int index, int line) : - name(strdup(name)), english(strdup(english)), translated(NULL), + name(stredup(name)), english(stredup(english)), translated(NULL), hash_next(0), index(index), line(line), translated_case(NULL) { } @@ -577,7 +577,7 @@ static const CmdStruct *ParseCommandString(const char **str, char *param, int *a * @param translation Are we reading a translation? */ StringReader::StringReader(StringData &data, const char *file, bool master, bool translation) : - data(data), file(strdup(file)), master(master), translation(translation) + data(data), file(stredup(file)), master(master), translation(translation) { } @@ -614,7 +614,7 @@ static void ExtractCommandString(ParsedCommandStruct *p, const char *s, bool war } else if (!(ar->flags & C_DONTCOUNT)) { // Ignore some of them if (p->np >= lengthof(p->pairs)) strgen_fatal("too many commands in string, max " PRINTF_SIZE, lengthof(p->pairs)); p->pairs[p->np].a = ar; - p->pairs[p->np].v = param[0] != '\0' ? strdup(param) : ""; + p->pairs[p->np].v = param[0] != '\0' ? stredup(param) : ""; p->np++; } } @@ -778,7 +778,7 @@ void StringReader::HandleString(char *str) if (casep != NULL) { ent->translated_case = new Case(ResolveCaseName(casep, strlen(casep)), s, ent->translated_case); } else { - ent->translated = strdup(s); + ent->translated = stredup(s); /* If the string was translated, use the line from the * translated language so errors in the translated file * are properly referenced to. */ |