(svn r17095) -Codechange: make ParseStringChoice a bit safer

This commit is contained in:
rubidium
2009-08-06 20:21:53 +00:00
parent 6ae880a40d
commit ee2b7de8f4
2 changed files with 10 additions and 16 deletions

View File

@@ -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);
}
}