Can't read MAT file saved with non-native endianness

Bug #716250 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HF-Lab
Triaged
Low
Matt Giuca

Bug Description

The MAT (Matlab) heightfield file format supports both big-endian and little-endian floating-point numbers. HF-Lab writes whichever format is native to the current machine (which is fine). However, it refuses to read a MAT file saved in a non-native endianness. Little-endian machines can only read MAT files saved by little-endian machines, and same for big-endian. If the file has non-native endianness, it prints "Unsupported file format type".

hf_io.c:read_mfile explicitly compares the endianness of the MAT file against NUM_FMT (this machine's endianness), and rejects the file if it does not match.

Instead, it should actually be able to process non-native-endian-encoded floating point numbers.

Tags: io
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.