From 080b590261a41ae487446675bfbf545fd4801728 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 2 Jun 2011 10:49:09 +0200 Subject: MADE: Remove all instances of s(n)printf --- engines/made/scriptfuncs.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'engines/made/scriptfuncs.cpp') 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; -- cgit v1.2.3