aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorMax Horn2011-03-18 14:41:40 +0100
committerMax Horn2011-06-18 01:36:15 +0200
commit71ea5acd29e97a123d095d88638778bf3dbe4d0d (patch)
tree64a8200bdf0e44e190f56662aabfe4a861e85a8a /engines/agi
parente792adb1b889580fa198d56e16f9098fd4227bb0 (diff)
downloadscummvm-rg350-71ea5acd29e97a123d095d88638778bf3dbe4d0d.tar.gz
scummvm-rg350-71ea5acd29e97a123d095d88638778bf3dbe4d0d.tar.bz2
scummvm-rg350-71ea5acd29e97a123d095d88638778bf3dbe4d0d.zip
AGI: Replace vsprintf by Common::String::vformat
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/text.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index fedfd29362..82a2340ad6 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -504,17 +504,16 @@ int AgiEngine::print(const char *p, int lin, int col, int len) {
*
*/
void AgiEngine::printStatus(const char *message, ...) {
- char x[42];
va_list args;
va_start(args, message);
- vsprintf(x, message, args);
+ Common::String x = Common::String::vformat(message, args);
va_end(args);
debugC(4, kDebugLevelText, "fg=%d, bg=%d", STATUS_FG, STATUS_BG);
- printText(x, 0, 0, _game.lineStatus, 40, STATUS_FG, STATUS_BG);
+ printText(x.c_str(), 0, 0, _game.lineStatus, 40, STATUS_FG, STATUS_BG);
}
static void safeStrcat(Common::String &p, const char *t) {