repsnapper icon indicating copy to clipboard operation
repsnapper copied to clipboard

Reading of binary files on powerpc fails

Open arjan opened this issue 14 years ago • 4 comments

When reading a binary STL file, the program crashes with a std::length_error which is caused by the number of triangles being wrongly read from the binary STL file. I suspect that this is a MSB vs LSB issue.

arjan avatar Feb 08 '11 21:02 arjan

Textual STL files work fine, by the way.

arjan avatar Feb 08 '11 21:02 arjan

Try this

https://github.com/epatel/repsnapper/commit/4fccc70cc979c8d4bc6efd0f7b601c9b6cecfe2d

epatel avatar Feb 08 '11 23:02 epatel

Awesome! Will try it once I get my hands on a powerpc again :)

arjan avatar Feb 10 '11 18:02 arjan

I changed the ppc ifdef into BIG_ENDIAN, and then it worked. thanks :) maybe do a pull request to tim to get this into the mainline.

arjan avatar Feb 28 '11 18:02 arjan