From d7db918fc289a6709c8757f873421a51e1a66476 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sun, 30 Dec 2007 14:17:25 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1539 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/command.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/src/command.cpp b/source/src/command.cpp index af654642..275fb60a 100644 --- a/source/src/command.cpp +++ b/source/src/command.cpp @@ -155,8 +155,9 @@ char *parseexp(const char *&p, int right) // parse any nested set of char *s = newstring(word, p-word-1); if(left=='(') { - char *ret = executeret(s); - s = exchangestr(s, ret ? ret : newstring("")); // evaluate () exps directly, and substitute result + char *ret = executeret(s); // evaluate () exps directly, and substitute result + delete[] s; + s = ret ? ret : newstring(""); } return s; }