summaryrefslogtreecommitdiffstats
path: root/opensuse/core/qt3/mng-reading-fix.patch
diff options
context:
space:
mode:
authorRobert Xu <robxu9@gmail.com>2011-11-12 18:13:39 -0500
committerRobert Xu <robxu9@gmail.com>2011-11-12 18:13:39 -0500
commitcd1f97695be1245ab19058d4fbc34e5697cc5383 (patch)
treeb265d96856632dc78e566d337f7eff254b6695f7 /opensuse/core/qt3/mng-reading-fix.patch
parent21fcfa3348213aa87f0e3aef62ca4720c6d31cb7 (diff)
downloadtde-packaging-cd1f97695be1245ab19058d4fbc34e5697cc5383.tar.gz
tde-packaging-cd1f97695be1245ab19058d4fbc34e5697cc5383.zip
fix up tdebase and add qt3
Diffstat (limited to 'opensuse/core/qt3/mng-reading-fix.patch')
-rw-r--r--opensuse/core/qt3/mng-reading-fix.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/opensuse/core/qt3/mng-reading-fix.patch b/opensuse/core/qt3/mng-reading-fix.patch
new file mode 100644
index 000000000..f0582ac6c
--- /dev/null
+++ b/opensuse/core/qt3/mng-reading-fix.patch
@@ -0,0 +1,30 @@
+--- src/kernel/qmngio.cpp.sav 2007-02-23 14:01:19.000000000 +0100
++++ src/kernel/qmngio.cpp 2007-08-28 15:27:28.000000000 +0200
+@@ -411,8 +411,11 @@ int QMNGFormat::decode( QImage& img, QIm
+ }
+
+ losttime += losingtimer.elapsed();
+- if ( ndata || !length )
+- mng_display_resume(handle);
++ bool needmore = false;
++ if ( ndata ) {
++ mng_retcode r = mng_display_resume(handle);
++ needmore = ( r == MNG_NEEDMOREDATA );
++ }
+ losingtimer.start();
+
+ image = 0;
+@@ -422,6 +425,13 @@ int QMNGFormat::decode( QImage& img, QIm
+ // Move back unused tail
+ memcpy(buffer,buffer+ubuffer,nbuffer);
+ }
++ // "The function should return without processing all the data if it reaches the end of a frame in the input."
++ if( ndata && !needmore ) {
++ length -= ndata;
++ ndata = 0;
++ if( length == 0 ) // 0 means done, process at least one byte
++ length = ndata = 1;
++ }
+ if ( ndata ) {
+ // Not all used.
+ enlargeBuffer(nbuffer+ndata);