summaryrefslogtreecommitdiffstats
path: root/dev-tqt/tqt/files/tqt-buffer.patch
blob: abe642c397cd782d466841a93a8bf715de1e3e1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/src/tools/qglobal.cpp
+++ b/src/tools/qglobal.cpp
@@ -520,7 +520,7 @@ void tqDebug( const char *msg, ... )
     va_list ap;
     va_start( ap, msg );			// use variable arg list
 #if defined(QT_VSNPRINTF)
-    QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH, msg, ap );
+    QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH-len, msg, ap );
 #else
     vsprintf( &buf[len], msg, ap );
 #endif
@@ -555,7 +555,7 @@ void tqWarning( const char *msg, ... )
     va_list ap;
     va_start( ap, msg );			// use variable arg list
 #if defined(QT_VSNPRINTF)
-    QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH, msg, ap );
+    QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH-len, msg, ap );
 #else
     vsprintf( &buf[len], msg, ap );
 #endif
@@ -590,7 +590,7 @@ void tqFatal( const char *msg, ... )
     va_list ap;
     va_start( ap, msg );			// use variable arg list
 #if defined(QT_VSNPRINTF)
-    QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH, msg, ap );
+    QT_VSNPRINTF( &buf[len], QT_BUFFER_LENGTH-len, msg, ap );
 #else
     vsprintf( &buf[len], msg, ap );
 #endif