diff options
author | Travis Howell | 2004-09-22 12:13:15 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-22 12:13:15 +0000 |
commit | 4871a2af1950da3e0012713d8b04762227ca06a2 (patch) | |
tree | 5e20990c41df1f09e3235d64888a367b1e26c6d4 /scumm | |
parent | 8950f786990fc4677537061ca9cfffad05f97ddc (diff) | |
download | scummvm-rg350-4871a2af1950da3e0012713d8b04762227ca06a2.tar.gz scummvm-rg350-4871a2af1950da3e0012713d8b04762227ca06a2.tar.bz2 scummvm-rg350-4871a2af1950da3e0012713d8b04762227ca06a2.zip |
Debug values are shown correctly now.
svn-id: r15235
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v72he.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 5e66341317..1003130aa7 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -558,13 +558,13 @@ void ScummEngine_v72he::copyScriptString(byte *dst) { void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) { int args[31]; - int num = 0, val = 0; - int len; + int num = 0, val; + int len, id; byte chr, string[256]; memset(string, 0, sizeof(string)); - getStackList(args, ARRAYSIZE(args)); - int id = pop(); + val = getStackList(args, ARRAYSIZE(args)); + args[val] = id = pop(); if (scriptString) { addMessageToStack(_scriptPointer, string, sizeof(string)); @@ -580,7 +580,7 @@ void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) { if (chr == '%') { chr = string[num++]; if (chr == 'd') { - dst += snprintf((char *)dst, 10, "%d", args[val++]); + dst += snprintf((char *)dst, 10, "%d", args[val--]); continue; } else if (chr == 's') { dst += addStringToStack(dst, 512, id++); |