Fix endian conversion

This was just plain wrong, so redo it properly.
1 file changed