From 05e868999de54caa53c1c93eb5a7a22bb593a040 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 25 Jul 2023 19:10:00 +0200 Subject: [PATCH] Fixed endian stuffs --- hbvm/src/validate.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbvm/src/validate.rs b/hbvm/src/validate.rs index 81f9a0a..d81b2d5 100644 --- a/hbvm/src/validate.rs +++ b/hbvm/src/validate.rs @@ -50,7 +50,7 @@ pub fn validate(mut program: &[u8]) -> Result<(), Error> { [] => return Ok(()), [LD..=ST, reg, _, _, _, _, _, _, _, _, count_0, count_1, ..] if usize::from(*reg) * 8 - + usize::from(u16::from_le_bytes([*count_0, *count_1])) + + usize::from(u16::from_le_bytes([*count_1, *count_0])) > 2048 => { return Err(Error {