diff options
Diffstat (limited to 'src/exceptionbase.cpp')
-rw-r--r-- | src/exceptionbase.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/exceptionbase.cpp b/src/exceptionbase.cpp index cea779d..9515e2d 100644 --- a/src/exceptionbase.cpp +++ b/src/exceptionbase.cpp | |||
@@ -55,7 +55,10 @@ void Bu::ExceptionBase::setWhat( const char *lpFormat, va_list &vargs ) | |||
55 | if( sWhat ) delete[] sWhat; | 55 | if( sWhat ) delete[] sWhat; |
56 | int nSize; | 56 | int nSize; |
57 | 57 | ||
58 | nSize = vsnprintf( NULL, 0, lpFormat, vargs ); | 58 | va_list vargs2; |
59 | va_copy( vargs2, vargs ); | ||
60 | nSize = vsnprintf( NULL, 0, lpFormat, vargs2 ); | ||
61 | va_end( vargs2 ); | ||
59 | sWhat = new char[nSize+1]; | 62 | sWhat = new char[nSize+1]; |
60 | vsnprintf( sWhat, nSize+1, lpFormat, vargs ); | 63 | vsnprintf( sWhat, nSize+1, lpFormat, vargs ); |
61 | } | 64 | } |