summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-12-11 10:04:07 -0700
committerBrian Paul <[email protected]>2009-12-11 10:04:07 -0700
commita087eb590d780cb82b49464e05ffc85123adce7e (patch)
treea2ac3ec2cc0b9001b350664d6e7915aba5e087a9 /progs
parentcb640c8d40c4ee34160a14d646c244f44a5013f6 (diff)
parente128cc205e30540597ecd57849060a6bf4714d9f (diff)
Merge branch 'mesa_7_7_branch'
Conflicts: src/gallium/state_trackers/xorg/xorg_xv.c src/mesa/drivers/dri/intel/intel_span.c
Diffstat (limited to 'progs')
-rw-r--r--progs/samples/rgbtoppm.c7
-rw-r--r--progs/util/readtex.c7
2 files changed, 12 insertions, 2 deletions
diff --git a/progs/samples/rgbtoppm.c b/progs/samples/rgbtoppm.c
index 56ca5b0efe9..dcb74228dff 100644
--- a/progs/samples/rgbtoppm.c
+++ b/progs/samples/rgbtoppm.c
@@ -93,7 +93,12 @@ static ImageRec *ImageOpen(char *fileName)
fread(image, 1, 12, image->file);
if (swapFlag) {
- ConvertShort(&image->imagic, 6);
+ ConvertShort(&image->imagic, 1);
+ ConvertShort(&image->type, 1);
+ ConvertShort(&image->dim, 1);
+ ConvertShort(&image->xsize, 1);
+ ConvertShort(&image->ysize, 1);
+ ConvertShort(&image->zsize, 1);
}
image->tmp = (unsigned char *)malloc(image->xsize*256);
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);