From: Vinson Lee Date: Thu, 10 Dec 2009 21:24:15 +0000 (-0800) Subject: progs/util: Byte swap individual members of struct _rawImageRec. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc0509bba8cc962a4ee2dafd684e153b3060262d;p=mesa.git progs/util: Byte swap individual members of struct _rawImageRec. --- diff --git a/progs/util/readtex.c b/progs/util/readtex.c index 81cb626e911..d1c50a494aa 100644 --- a/progs/util/readtex.c +++ b/progs/util/readtex.c @@ -117,7 +117,12 @@ static rawImageRec *RawImageOpen(const char *fileName) fread(raw, 1, 12, raw->file); if (swapFlag) { - ConvertShort(&raw->imagic, 6); + ConvertShort(&raw->imagic, 1); + ConvertShort(&raw->type, 1); + ConvertShort(&raw->dim, 1); + ConvertShort(&raw->sizeX, 1); + ConvertShort(&raw->sizeY, 1); + ConvertShort(&raw->sizeZ, 1); } raw->tmp = (unsigned char *)malloc(raw->sizeX*256);