diff options
author | Max Horn | 2011-06-02 10:49:09 +0200 |
---|---|---|
committer | Max Horn | 2011-06-02 10:49:09 +0200 |
commit | 080b590261a41ae487446675bfbf545fd4801728 (patch) | |
tree | b664be5e3812b3bd4336b3ca2ddcece2f1041ac4 /engines/made/scriptfuncs.cpp | |
parent | 668ae0363e8f0c823a43a83b4b9682140ffb8eff (diff) | |
download | scummvm-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/scriptfuncs.cpp')
-rw-r--r-- | engines/made/scriptfuncs.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index 98cfb647ac..aa172bbe74 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -502,28 +502,28 @@ int16 ScriptFunctions::sfDrawText(int16 argc, int16 *argv) { } if (text) { - char finalText[1024]; + Common::String finalText; switch (argc) { case 1: - snprintf(finalText, 1024, "%s", text); + finalText = text; break; case 2: - snprintf(finalText, 1024, text, argv[0]); + finalText = Common::String::format(text, argv[0]); break; case 3: - snprintf(finalText, 1024, text, argv[1], argv[0]); + finalText = Common::String::format(text, argv[1], argv[0]); break; case 4: - snprintf(finalText, 1024, text, argv[2], argv[1], argv[0]); + finalText = Common::String::format(text, argv[2], argv[1], argv[0]); break; case 5: - snprintf(finalText, 1024, text, argv[3], argv[2], argv[1], argv[0]); + finalText = Common::String::format(text, argv[3], argv[2], argv[1], argv[0]); break; default: - finalText[0] = '\0'; + // Leave it empty break; } - _vm->_screen->printText(finalText); + _vm->_screen->printText(finalText.c_str()); } return 0; |