From 277b5a26e491c8be0cddd9c33d3b9a14cd4c5cf2 Mon Sep 17 00:00:00 2001 From: D4VID Date: Sun, 18 May 2025 18:17:55 +0200 Subject: [PATCH] Fix endianness --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9b73897..a65fc2f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,7 @@ fn generate_font_data() -> io::Result<()> { if i % 6 == 5 { // Write the digit to the output binary file println!("Writing {:x}", bits); - output_file.write(&bits.to_be_bytes())?; + output_file.write(&bits.to_le_bytes())?; bits = 0; println!(); @@ -49,7 +49,7 @@ fn generate_font_data() -> io::Result<()> { // Write last remaining character println!("Writing remaining {:x}", bits); - output_file.write(&bits.to_be_bytes())?; + output_file.write(&bits.to_le_bytes())?; return Ok(()); }