Try fixing bigendian metadata serialisation

I compiled this on PPC to check and it seems to work, but not sure whether I didn't mess up
anything in a major way.

Maybe a good shot at #41443
This commit is contained in:
Simonas Kazlauskas 2017-05-01 04:51:17 +03:00
parent 06fb4d2564
commit 54de2749b0

View File

@ -58,7 +58,7 @@ impl Index {
let pos = buf.position();
// First we write the length of the lower range ...
buf.write_all(words_to_bytes(&[self.positions[0].len() as u32])).unwrap();
buf.write_all(words_to_bytes(&[(self.positions[0].len() as u32).to_le()])).unwrap();
// ... then the values in the lower range ...
buf.write_all(words_to_bytes(&self.positions[0][..])).unwrap();
// ... then the values in the higher range.