]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/error.cpp
apply back 335 and 336, will need to update deps and put a zip out
[xonotic/netradiant.git] / radiant / error.cpp
index 3d2a97c2ddf2f3d6da30dde6a4530f30fa20bbee..41c0ab461067870a6a0eef47665209e95376f92e 100644 (file)
@@ -35,8 +35,8 @@ For abnormal program terminations
 */
 
 /*!
-\todo 
-FIXME the prompt wether to do prefs dialog, may not even be possible 
+\todo
+FIXME the prompt wether to do prefs dialog, may not even be possible
 if the crash happens before the game is loaded
 */
 
@@ -64,22 +64,21 @@ void Error (const char *error, ...)
   if (GetLastError() != 0)
   {
     LPVOID lpMsgBuf;
-    FormatMessage( 
-      FORMAT_MESSAGE_ALLOCATE_BUFFER | 
-      FORMAT_MESSAGE_FROM_SYSTEM | 
+    FormatMessage(
+      FORMAT_MESSAGE_ALLOCATE_BUFFER |
+      FORMAT_MESSAGE_FROM_SYSTEM |
       FORMAT_MESSAGE_IGNORE_INSERTS,
       NULL,
       GetLastError(),
       MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
       (LPTSTR) &lpMsgBuf,
       0,
-      NULL 
+      NULL
       );
     strcat( text, "GetLastError: " );
     /*
     Gtk will only crunch 0<=char<=127
     this is a bit hackish, but I didn't find useful functions in win32 API for this
-    http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=516
     */
     TCHAR *scan, *next = (TCHAR*)lpMsgBuf;
     do
@@ -146,6 +145,6 @@ void WINAPI Error (char *error, ...)
   va_start (argptr,error);
   vsprintf (text, error,argptr);
   va_end (argptr);
-       
+
        Error((const char *)text);
 }