From ee2b7de8f41a6ccee5522e0de53cf5476e041350 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 6 Aug 2009 20:21:53 +0000 Subject: (svn r17095) -Codechange: make ParseStringChoice a bit safer --- src/strgen/strgen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/strgen/strgen.cpp') 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); } } -- cgit v1.2.3-70-g09d2