From: Dimitri Schoolwerth Date: Fri, 27 May 2011 12:25:25 +0000 (+0000) Subject: Fixed saving GIFs on big-endian architectures. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ff5bf31cb107363ab0fa8ce42729d71b525611be Fixed saving GIFs on big-endian architectures. 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 --- diff --git a/src/common/imaggif.cpp b/src/common/imaggif.cpp index b90bd8fb99..52f9cf14c4 100644 --- a/src/common/imaggif.cpp +++ b/src/common/imaggif.cpp @@ -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,