1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-03 18:24:05 +02:00

fix inbounds check for bit coord

This commit is contained in:
Robin Appelman 2021-07-22 17:22:01 +02:00
commit abfdbdcd9d

View file

@ -1271,7 +1271,7 @@ pub fn write_bit_coord_mp(
low_precision: bool, low_precision: bool,
) -> ReadResult<()> { ) -> ReadResult<()> {
let abs = val.abs(); let abs = val.abs();
let in_bounds = (abs as u32) <= 2u32.pow(10); let in_bounds = (abs as u32) < (1 << 11);
let has_int_val = abs >= 1.0; let has_int_val = abs >= 1.0;
in_bounds.write(stream)?; in_bounds.write(stream)?;
has_int_val.write(stream)?; has_int_val.write(stream)?;