summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-12-10 13:24:15 -0800
committerVinson Lee <[email protected]>2009-12-10 13:24:15 -0800
commitbc0509bba8cc962a4ee2dafd684e153b3060262d (patch)
treefbbe48daa1f7c118f1fb0ef8bb209a7851b144ab
parent51f52edaf186a927a2c8c29ba9dba56d18928a7e (diff)
progs/util: Byte swap individual members of struct _rawImageRec.
-rw-r--r--progs/util/readtex.c7
1 files changed, 6 insertions, 1 deletions
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);