Fixed issue with missed big-endian checks as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=586
This commit is contained in:
parent
1dd55fd57c
commit
8ed4e58b51
@ -1,4 +1,4 @@
|
||||
/* $Id: ras2tiff.c,v 1.8 2004-07-24 19:04:37 dron Exp $ */
|
||||
/* $Id: ras2tiff.c,v 1.9 2004-08-16 19:13:53 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -24,6 +24,8 @@
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "tif_config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -91,7 +93,7 @@ main(int argc, char* argv[])
|
||||
return (-2);
|
||||
}
|
||||
if (strcmp(h.ras_magic, RAS_MAGIC) == 0) {
|
||||
#if (HOST_BIGENDIAN == 0)
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
TIFFSwabLong(&h.ras_width);
|
||||
TIFFSwabLong(&h.ras_height);
|
||||
TIFFSwabLong(&h.ras_depth);
|
||||
@ -101,7 +103,7 @@ main(int argc, char* argv[])
|
||||
TIFFSwabLong(&h.ras_maplength);
|
||||
#endif
|
||||
} else if (strcmp(h.ras_magic, RAS_MAGIC_INV) == 0) {
|
||||
#if (HOST_BIGENDIAN == 1)
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
TIFFSwabLong(&h.ras_width);
|
||||
TIFFSwabLong(&h.ras_height);
|
||||
TIFFSwabLong(&h.ras_depth);
|
||||
|
Loading…
Reference in New Issue
Block a user