render: Fix incorrectly reading U24 in ATF parsing

We should be reading a big-endian U24.
This commit is contained in:
Aaron Hill 2023-09-30 16:51:55 -04:00
parent d2f0787c2c
commit d76306d5ae
1 changed files with 1 additions and 1 deletions

View File

@ -113,5 +113,5 @@ fn read_uint24<R: Read>(data: &mut R) -> Result<u32, Box<dyn std::error::Error>>
let ch1 = data.read_u8()? as u32;
let ch2 = data.read_u8()? as u32;
let ch3 = data.read_u8()? as u32;
Ok(ch1 | (ch2 << 8) | (ch3 << 16))
Ok(ch3 | (ch2 << 8) | (ch1 << 16))
}