forked from AbleOS/holey-bytes
Fixed endian stuffs
This commit is contained in:
parent
c830688599
commit
05e868999d
|
@ -50,7 +50,7 @@ pub fn validate(mut program: &[u8]) -> Result<(), Error> {
|
||||||
[] => return Ok(()),
|
[] => return Ok(()),
|
||||||
[LD..=ST, reg, _, _, _, _, _, _, _, _, count_0, count_1, ..]
|
[LD..=ST, reg, _, _, _, _, _, _, _, _, count_0, count_1, ..]
|
||||||
if usize::from(*reg) * 8
|
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 =>
|
> 2048 =>
|
||||||
{
|
{
|
||||||
return Err(Error {
|
return Err(Error {
|
||||||
|
|
Loading…
Reference in a new issue