After much hair pulling, fixed a bug in the db loader that affected big endian

systems.

When saving compressed images, the header was not being byte swapped, but it
was when loading (which is why db's created on little endian systems worked, but
not ones created and used on the big endian systems). So now the headers are
also swapped to little endian order when saving.


SVN revision: 5458
This commit is contained in:
Nathan Ingersoll 2001-10-09 22:27:36 +00:00
parent 23648152e9
commit be542e7e7c
1 changed files with 4 additions and 0 deletions

View File

@ -325,7 +325,11 @@ save (ImlibImage *im, ImlibProgressFunction progress,
buflen = ((im->w * im->h * sizeof(DATA32) * 101) / 100) + 12;
#ifdef WORDS_BIGENDIAN
{
int i;
DATA32 *buf2;
for (i = 0; i < 8; i++)
SWAP32(header[i]);
buf2 = malloc((((im->w * im->h * 101) / 100) + 3) * sizeof(DATA32));
if (buf2)