aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-12-16 19:53:41 +0000
committerPaweł Kołodziejski2002-12-16 19:53:41 +0000
commitfa4f785f71ab7ea7f353bf5268db1ac69bed24f8 (patch)
tree1578513771681704404e0d4be1e82cf78ea6e32d /gui
parentf1db7ce77e91da462a4ed1740a044f4a7e2f23c1 (diff)
downloadscummvm-rg350-fa4f785f71ab7ea7f353bf5268db1ac69bed24f8.tar.gz
scummvm-rg350-fa4f785f71ab7ea7f353bf5268db1ac69bed24f8.tar.bz2
scummvm-rg350-fa4f785f71ab7ea7f353bf5268db1ac69bed24f8.zip
fixed compilation under MSVC
svn-id: r5998
Diffstat (limited to 'gui')
-rw-r--r--gui/console.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/gui/console.cpp b/gui/console.cpp
index 1e3c2c1226..0433eee569 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -153,7 +153,8 @@ void ConsoleDialog::handleKeyDown(uint16 ascii, int keycode, int modifiers)
nextLine();
int len = _promptEndPos - _promptStartPos;
- char str[len + 1];
+// char str[len + 1];
+ char str[1000];
if (len < 0) len = 0; // Prevent overflow from forced Ctrl-D deletion
@@ -409,7 +410,11 @@ int ConsoleDialog::vprintf(const char *format, va_list argptr)
{
char buf[2048];
+#if defined(WIN32)
+ int count = _vsnprintf(buf, sizeof(buf), format, argptr);
+#else
int count = vsnprintf(buf, sizeof(buf), format, argptr);
+#endif
print(buf);
return count;
}