aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/glk/alan2/parse.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/glk/alan2/parse.cpp b/engines/glk/alan2/parse.cpp
index dd0623888e..17e4dc9db3 100644
--- a/engines/glk/alan2/parse.cpp
+++ b/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] == ',') {