Restore native byte order before running need_to_reorder_bytes.
authorW. Trevor King <wking@tremily.us>
Mon, 16 Jul 2012 20:28:43 +0000 (16:28 -0400)
committerW. Trevor King <wking@tremily.us>
Mon, 16 Jul 2012 20:28:43 +0000 (16:28 -0400)
Otherwise an earier switch to a non-native byte ordering will confuse
the current load.

igor/binarywave.py

index 3429ad18a9bd655c11c62535c8e7fc6b5d3b4144..ae60f14bb44fa1cb4ae02910807fad34c4b090a4 100644 (file)
@@ -476,6 +476,7 @@ def loadibw(filename, strict=True):
     else:
         f = open(filename, 'rb')
     try:
+        BinHeaderCommon.set_byte_order('=')
         b = buffer(f.read(BinHeaderCommon.size))
         version = BinHeaderCommon.unpack_dict_from(b)['version']
         needToReorderBytes = need_to_reorder_bytes(version)