Permalink
Browse files

GLK: ALAN2: Fix incorrect string duplication

  • Loading branch information...
dreammaster committed Feb 12, 2019
1 parent c03e52b commit 37e083dcafd4e1243271760974f3671d8a537cf9
Showing with 1 addition and 2 deletions.
  1. +1 −2 engines/glk/alan2/parse.cpp
@@ -164,7 +164,6 @@ void Parser::agetline() {
void Parser::scan() {
uint i;
int w;
char *str;

agetline();
wrds[0] = 0;
@@ -204,7 +203,7 @@ void Parser::scan() {
Common::String tmp = token;
tmp.deleteChar(0);
tmp.deleteLastChar();
strcpy(str, tmp.c_str());
char *str = scumm_strdup(tmp.c_str());

litValues[litCount++].value = (Aptr) str;
} else if (token[0] == ',') {

0 comments on commit 37e083d

Please sign in to comment.