diff options
author | Max Horn | 2010-05-05 20:43:22 +0000 |
---|---|---|
committer | Max Horn | 2010-05-05 20:43:22 +0000 |
commit | 93375526c081f279578058fd4336c695898488c3 (patch) | |
tree | f649adb9f9e9c949bf7111299c58a5fb16a8de72 /engines/scumm/he/logic_he.cpp | |
parent | d4e74e62a1bc51cc672e800050142008b5dac904 (diff) | |
download | scummvm-rg350-93375526c081f279578058fd4336c695898488c3.tar.gz scummvm-rg350-93375526c081f279578058fd4336c695898488c3.tar.bz2 scummvm-rg350-93375526c081f279578058fd4336c695898488c3.zip |
SCUMM: Convert some code to use Common::String
svn-id: r48957
Diffstat (limited to 'engines/scumm/he/logic_he.cpp')
-rw-r--r-- | engines/scumm/he/logic_he.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index b7d2c9264c..add9b982e2 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -75,22 +75,17 @@ void LogicHE::putInArray(int arg0, int idx2, int idx1, int val) { int32 LogicHE::dispatch(int op, int numArgs, int32 *args) { #if 1 - char tmp[32], str[256]; + Common::String str; + str = Common::String::printf("LogicHE::dispatch(%d, %d, [", op, numArgs); if (numArgs > 0) - snprintf(tmp, 32, "%d", args[0]); - else - *tmp = 0; - - snprintf(str, 256, "LogicHE::dispatch(%d, %d, [%s", op, numArgs, tmp); - + str += Common::String::printf("%d", args[0]); for (int i = 1; i < numArgs; i++) { - snprintf(tmp, 32, ", %d", args[i]); - strncat(str, tmp, sizeof(str) - strlen(str) - 1); + str += Common::String::printf(", %d", args[i]); } - strncat(str, "])", sizeof(str) - strlen(str) - 1); + str += "])"; - debug(0, "%s", str); + debug(0, "%s", str.c_str()); #else // Used for parallel trace utility for (int i = 0; i < numArgs; i++) |