diff --git a/Source/script.cpp b/Source/script.cpp index e0db6315..63903177 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -902,6 +902,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) { if (!line.gettoken_str(1)[0]) PRINTHELP() char *t=(char *)m_macros.get(); + char *m=t; while (t && *t) { if (!stricmp(t,line.gettoken_str(1))) break; @@ -975,6 +976,15 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) return ret; } } + { + // fix t if process_oneline changed m_macros + char *nm=(char *)m_macros.get(); + if (nm != m) + { + t += nm - m; + m = nm; + } + } t+=strlen(t)+1; } m_macro_entry.delbypos(npos);