projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51f52ed
)
progs/util: Byte swap individual members of struct _rawImageRec.
author
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 21:24:15 +0000
(13:24 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Thu, 10 Dec 2009 21:24:15 +0000
(13:24 -0800)
progs/util/readtex.c
patch
|
blob
|
history
diff --git
a/progs/util/readtex.c
b/progs/util/readtex.c
index 81cb626e911d5a4c501eec11fadfec0506ec45f8..d1c50a494aa3350dcadf2e02f67edb4ec00db5a7 100644
(file)
--- 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);