Browse Source

progs/util: Byte swap individual members of struct _rawImageRec.

tags/mesa-7.6.1-rc3-1
Vinson Lee 16 years ago
parent
commit
bc0509bba8
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      progs/util/readtex.c

+ 6
- 1
progs/util/readtex.c View File

@@ -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);

Loading…
Cancel
Save