You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-packaging-gentoo/dev-tqt/tqt/files/tqt-buffer.patch

30 lines
1.0 KiB

--- 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