From d26cccdc81fa6ce0f529c68f6a6eeb3d58e5822d Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Fri, 25 Oct 2002 21:40:10 +0000 Subject: [PATCH] Clean up. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@437 --- src/misc/support.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/misc/support.cpp b/src/misc/support.cpp index 689d3990..fb16f52a 100644 --- a/src/misc/support.cpp +++ b/src/misc/support.cpp @@ -171,21 +171,18 @@ void S_Warn(char * format,...) { GFX_ShowMsg(buf); #endif } + static char buf[1024]; //greater scope as else it doesn't always gets thrown right (linux/gcc2.95) void E_Exit(char * format,...) { - -// char buf[1024]; //see above - if(errorlevel>=1){ - - va_list msg; - va_start(msg,format); - vsprintf(buf,format,msg); - va_end(msg); - - strcat(buf,"\n"); + if(errorlevel>=1) { + va_list msg; + va_start(msg,format); + vsprintf(buf,format,msg); + va_end(msg); + + strcat(buf,"\n"); } else { - strcpy(buf,"an unsupported feature\n"); + strcpy(buf,"an unsupported feature\n"); } - throw(buf); -}; +}