diff options
author | Jonathan Gray | 2005-04-09 01:52:44 +0000 |
---|---|---|
committer | Jonathan Gray | 2005-04-09 01:52:44 +0000 |
commit | 24c92d00919500a725a6d4c4797b48088b56431f (patch) | |
tree | 3473f42551f3263c3aa586e48d2648f251f293f3 /sky/control.cpp | |
parent | aff66038f3fd5b0e5af49c94c7f0a5270981f7cf (diff) | |
download | scummvm-rg350-24c92d00919500a725a6d4c4797b48088b56431f.tar.gz scummvm-rg350-24c92d00919500a725a6d4c4797b48088b56431f.tar.bz2 scummvm-rg350-24c92d00919500a725a6d4c4797b48088b56431f.zip |
Remove usage of vsprintf in favour of vsnprintf and make
more use of STRINGBUFLEN. Some ports may need a new stub for
this, discussed with Chrilith.
svn-id: r17463
Diffstat (limited to 'sky/control.cpp')
-rw-r--r-- | sky/control.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sky/control.cpp b/sky/control.cpp index 22f1840249..a6179f48bf 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -1053,15 +1053,11 @@ bool Control::loadSaveAllowed(void) { } int Control::displayMessage(const char *altButton, const char *message, ...) { -#ifdef __PALM_OS__ - char buf[256]; // 1024 is too big overflow the stack -#else - char buf[1024]; -#endif + char buf[STRINGBUFLEN]; va_list va; va_start(va, message); - vsprintf(buf, message, va); + vsnprintf(buf, STRINGBUFLEN, message, va); va_end(va); GUI::MessageDialog dialog(buf, "OK", altButton); |