]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed saving GIFs on big-endian architectures.
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Fri, 27 May 2011 12:25:25 +0000 (12:25 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Fri, 27 May 2011 12:25:25 +0000 (12:25 +0000)
Word (16 bits) values were written in the wrong order resulting in invalid GIF files on for example PowerPC machines.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/imaggif.cpp

index b90bd8fb99502b18b5f49bccb86a4131dc0d2cd2..52f9cf14c466778c056f89b41ea7a36f3446585f 100644 (file)
@@ -643,7 +643,7 @@ bool wxGIFHandler_WriteWord(wxOutputStream *stream, wxUint16 word)
 
     buf[0] = word & 0xff;
     buf[1] = (word >> 8) & 0xff;
-    return wxGIFHandler_Write(stream, &word, sizeof(word));
+    return wxGIFHandler_Write(stream, &buf, sizeof(buf));
 }
 
 bool wxGIFHandler_WriteHeader(wxOutputStream *stream, int width, int height,