summaryrefslogtreecommitdiff
path: root/src/strgen
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-08-06 20:21:53 +0000
committerrubidium <rubidium@openttd.org>2009-08-06 20:21:53 +0000
commitee2b7de8f41a6ccee5522e0de53cf5476e041350 (patch)
tree64087de9d4e61ceb044704c7c1979bd07131b1df /src/strgen
parent6ae880a40d46949e5ff032c235139fffd65082dd (diff)
downloadopenttd-ee2b7de8f41a6ccee5522e0de53cf5476e041350.tar.xz
(svn r17095) -Codechange: make ParseStringChoice a bit safer
Diffstat (limited to 'src/strgen')
-rw-r--r--src/strgen/strgen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 236597cdd..167af24f0 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -327,9 +327,10 @@ static int TranslateArgumentIdx(int arg);
static void EmitWordList(const char * const *words, uint nw)
{
PutByte(nw);
- for (uint i = 0; i < nw; i++) PutByte(strlen(words[i]));
+ for (uint i = 0; i < nw; i++) PutByte(strlen(words[i]) + 1);
for (uint i = 0; i < nw; i++) {
for (uint j = 0; words[i][j] != '\0'; j++) PutByte(words[i][j]);
+ PutByte(0);
}
}