diff --git a/ogl_editor/src/rlog.c b/ogl_editor/src/rlog.c index 6574278..04c1141 100644 --- a/ogl_editor/src/rlog.c +++ b/ogl_editor/src/rlog.c @@ -14,7 +14,6 @@ static int s_old_level = 0; void rlog(int logLevel, const char* format, ...) { - char buffer[2048]; va_list ap; if (logLevel < s_log_level) @@ -22,8 +21,11 @@ void rlog(int logLevel, const char* format, ...) va_start(ap, format); #if defined(_WIN32) - vsprintf(buffer, format, ap); - OutputDebugStringA(buffer); + { + char buffer[2048]; + vsprintf(buffer, format, ap); + OutputDebugStringA(buffer); + } #else vprintf(format, ap); #endif