diff options
author | Johannes Schickel | 2009-08-16 17:36:16 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-08-16 17:36:16 +0000 |
commit | ecb642305558f52af65b7d91b9ec38c91ef2aa06 (patch) | |
tree | a233562ff8971b18d2dd0444dc1d5a10995f71ee | |
parent | 418fb485c96141c1533b3e0d62fc6836ecf771ec (diff) | |
download | scummvm-rg350-ecb642305558f52af65b7d91b9ec38c91ef2aa06.tar.gz scummvm-rg350-ecb642305558f52af65b7d91b9ec38c91ef2aa06.tar.bz2 scummvm-rg350-ecb642305558f52af65b7d91b9ec38c91ef2aa06.zip |
Fix warning caused by -Wformat-security, also fixed a possible buffer overflow along with it.
svn-id: r43445
-rw-r--r-- | engines/scumm/imuse/imuse.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp index 2d20b72db6..455eaac984 100644 --- a/engines/scumm/imuse/imuse.cpp +++ b/engines/scumm/imuse/imuse.cpp @@ -695,11 +695,11 @@ int32 IMuseInternal::doCommand_internal(int numargs, int a[]) { return -1; { - char string[128]; - sprintf(string, "doCommand - %d (%d/%d)", a[0], (int)param, (int)cmd); + Common::String string = "doCommand - "; + string += Common::String::printf("%d (%d/%d)", a[0], (int)param, (int)cmd); for (i = 1; i < numargs; ++i) - sprintf(string + strlen(string), ", %d", a[i]); - debugC(DEBUG_IMUSE, string); + string += Common::String::printf(", %d", a[i]); + debugC(DEBUG_IMUSE, "%s", string.c_str()); } if (param == 0) { |