summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tools/qstring.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp
index 26e9b61c..28b9c520 100644
--- a/src/tools/qstring.cpp
+++ b/src/tools/qstring.cpp
@@ -2619,13 +2619,12 @@ TQString &TQString::sprintf(const char *cformat, ...)
if ( !cformat || !*cformat ) {
// TQt 1.x compat
*this = fromLatin1( "" );
- return *this;
+ } else {
+ vsprintf(cformat, ap);
}
- TQString &s = vsprintf(cformat, ap);
-
va_end(ap);
- return s;
+ return *this;
}
TQString &TQString::vsprintf( const char* cformat, va_list ap )