diff options
author | Max Horn | 2005-04-06 17:24:18 +0000 |
---|---|---|
committer | Max Horn | 2005-04-06 17:24:18 +0000 |
commit | 26e0ec1d240c71f5fdc34b912ee8ddf0368ab6dc (patch) | |
tree | 9c05dd3b9478832243f9ec6791623b4bc00abf96 /scumm/script_v72he.cpp | |
parent | d0615eb956212ed935a1be8bef608e1ece904627 (diff) | |
download | scummvm-rg350-26e0ec1d240c71f5fdc34b912ee8ddf0368ab6dc.tar.gz scummvm-rg350-26e0ec1d240c71f5fdc34b912ee8ddf0368ab6dc.tar.bz2 scummvm-rg350-26e0ec1d240c71f5fdc34b912ee8ddf0368ab6dc.zip |
itoa is not ANSI C and not portable. TODO: Implement the %b case
svn-id: r17419
Diffstat (limited to 'scumm/script_v72he.cpp')
-rw-r--r-- | scumm/script_v72he.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 9e6f0dd6e1..b38f8c15a7 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -562,17 +562,14 @@ void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) { chr = string[num++]; switch(chr) { case 'b': - itoa(args[val--], (char *)dst, 2); - while (*dst != 0) - *dst++; + // FIXME TODO + //dst += sprintf((char *)dst, "%b", args[val--]); break; case 'c': *dst++ = args[val--]; break; case 'd': - itoa(args[val--], (char *)dst, 10); - while (*dst != 0) - *dst++; + dst += sprintf((char *)dst, "%d", args[val--]); break; case 's': src = getStringAddress(args[val--]); @@ -580,9 +577,7 @@ void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) { *dst++ = *src++; break; case 'x': - itoa(args[val--], (char *)dst, 16); - while (*dst != 0) - *dst++; + dst += sprintf((char *)dst, "%x", args[val--]); break; default: error("decodeScriptString: Unknown type %d", chr); |