aboutsummaryrefslogtreecommitdiff
path: root/engines/made/script.cpp
diff options
context:
space:
mode:
authorMax Horn2011-06-02 10:49:09 +0200
committerMax Horn2011-06-02 10:49:09 +0200
commit080b590261a41ae487446675bfbf545fd4801728 (patch)
treeb664be5e3812b3bd4336b3ca2ddcece2f1041ac4 /engines/made/script.cpp
parent668ae0363e8f0c823a43a83b4b9682140ffb8eff (diff)
downloadscummvm-rg350-080b590261a41ae487446675bfbf545fd4801728.tar.gz
scummvm-rg350-080b590261a41ae487446675bfbf545fd4801728.tar.bz2
scummvm-rg350-080b590261a41ae487446675bfbf545fd4801728.zip
MADE: Remove all instances of s(n)printf
Diffstat (limited to 'engines/made/script.cpp')
-rw-r--r--engines/made/script.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/made/script.cpp b/engines/made/script.cpp
index 85e1a6ec6b..2776008828 100644
--- a/engines/made/script.cpp
+++ b/engines/made/script.cpp
@@ -639,10 +639,9 @@ void ScriptInterpreter::dumpScript(int16 objectIndex, int *opcodeStats, int *ext
const char *sig = _commands[opcode - 1].sig;
int valueType; /* 0: dec; 1: hex; 2: extended function */
int16 value;
- char tempStr[32];
opcodeStats[opcode - 1]++;
- snprintf(tempStr, 32, "[%04X] ", (uint16)(code - codeStart - 1));
- codeLine += tempStr;
+
+ codeLine += Common::String::format("[%04X] ", (uint16)(code - codeStart - 1));
codeLine += desc;
for (; *sig != '\0'; sig++) {
codeLine += " ";
@@ -670,19 +669,21 @@ void ScriptInterpreter::dumpScript(int16 objectIndex, int *opcodeStats, int *ext
value = *code++;
break;
}
+
+ Common::String tempStr;
switch (valueType) {
case 0:
- snprintf(tempStr, 32, "%d", value);
+ tempStr = Common::String::format("%d", value);
break;
case 1:
- snprintf(tempStr, 32, "0x%X", value);
+ tempStr = Common::String::format("0x%X", value);
break;
case 2:
if (value < _functions->getCount()) {
- snprintf(tempStr, 32, "%s", _functions->getFuncName(value));
+ tempStr = Common::String::format("%s", _functions->getFuncName(value));
externStats[value]++;
} else {
- snprintf(tempStr, 32, "invalid: %d", value);
+ tempStr = Common::String::format("invalid: %d", value);
}
break;
}