Data Record binary endianness is determined by uninitialized variable

Initialized the variable that DRBinary is using to check for little/big
endianness.

fixes #60
This commit is contained in:
Alex Lin 2015-05-21 16:47:11 -05:00
parent caf79f5e45
commit 366afd27dc

View File

@ -72,6 +72,7 @@ int Trick::DRBinary::format_specific_init() {
/* Check to see if data is being recorded in little endian
* byte order, and add little endian line if so.
*/
byte_order_union.l = 1 ;
if (byte_order_union.c[sizeof(long)-1] != 1) {
write( fp , "Trick-10-L", (size_t)10 ) ;
} else {