diff options
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; |