Opened 22 years ago

Last modified 22 years ago

#261 closed defect (fixed)

broken handling of the "byte order" key in ENVI format

Reported by: alessandro_amici@… Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

Frank,

cut-and-paste mistake in envidataset.cpp detected :)

/* -------------------------------------------------------------------- */
/*      Translate the byte order.					*/
/* -------------------------------------------------------------------- */
    int		bNativeOrder = TRUE;

    if( CSLFetchNameValue(poDS->papszHeader,"data_type" ) != NULL )
					     ^^^^^^^^^

there and in the following lines "data_type" should obviously read
"byte_order".

suggested fix was tested on linux.

cheers,
alessandro

Change History (3)

comment:1 by warmerdam, 22 years ago

Patch applied.  How embarassing!


comment:2 by alessandro_amici@…, 22 years ago

my bad!

i used a hand-edited .hdr file while testing my fix and it had
the wrong byte order :(

0 is host (intel)
1 is network (IEEE)

so the tests inside CPL_LSB need to be reversed.

sorry for the noise
alessandro

comment:3 by warmerdam, 22 years ago

I have patched the code accordingly.

Note: See TracTickets for help on using tickets.