summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/ConsoleWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/Src/ConsoleWindow.cpp')
-rw-r--r--Source/Core/Common/Src/ConsoleWindow.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/Common/Src/ConsoleWindow.cpp b/Source/Core/Common/Src/ConsoleWindow.cpp
index 9e6404b9fe..68273e013d 100644
--- a/Source/Core/Common/Src/ConsoleWindow.cpp
+++ b/Source/Core/Common/Src/ConsoleWindow.cpp
@@ -95,16 +95,19 @@ void Close()
// Print to screen and file
int Print(const char *fmt, ...)
{
+ // Maximum bytes, mind this value to avoid an overrun
+ static const int MAX_BYTES = 1024*20;
+
#if defined(_WIN32)
if(__hStdOut)
{
#endif
- char s[1024*20]; // Warning, mind this value
+ char s[MAX_BYTES];
va_list argptr;
int cnt; // To store the vsnprintf return message
va_start(argptr, fmt);
- cnt = vsnprintf(s, 500, fmt, argptr);
+ cnt = vsnprintf(s, MAX_BYTES, fmt, argptr);
va_end(argptr);