]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/error.cpp
Implement buffer operations
[xonotic/netradiant.git] / radiant / error.cpp
index 56a8a056d6bee05ad7ef253bdbd0f6d51c397cbb..b14170009bed650262fc3c0240d4b5fbe7b821b7 100644 (file)
@@ -60,10 +60,10 @@ void Error( const char *error, ... ){
        auto text = u::buffer<4096>();
 
        va_start( argptr,error );
-       vsprintf( text, error,argptr );
+       vsprintf( text.mut(), error,argptr );
        va_end( argptr );
 
-       strcat( text, "\n" );
+       strcat( text.mut(), "\n" );
 
 #ifdef WIN32
        if ( GetLastError() != 0 ) {
@@ -103,9 +103,9 @@ void Error( const char *error, ... ){
        }
 #else
        if ( errno != 0 ) {
-               strcat( text, "errno: " );
-               strcat( text, strerror( errno ) );
-               strcat( text, "\n" );
+               strcat( text.mut(), "errno: " );
+               strcat( text.mut(), strerror( errno ) );
+               strcat( text.mut(), "\n" );
        }
 #endif
 
@@ -126,7 +126,7 @@ void Error( const char *error, ... ){
        }
 #endif
 
-       strcat( text, "An unrecoverable error has occured.\n" );
+       strcat( text.mut(), "An unrecoverable error has occured.\n" );
 
        ERROR_MESSAGE( text );