Skip to content

Commit

Permalink
Try fixing bigendian metadata serialisation
Browse files Browse the repository at this point in the history
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 rust-lang#41443
  • Loading branch information
nagisa authored and brson committed May 10, 2017
1 parent d4e107d commit ed2537b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_metadata/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ed2537b

Please sign in to comment.