diff --git a/sub/xpat/src/scanner.rs b/sub/xpat/src/scanner.rs index 6a99701..63ff67f 100644 --- a/sub/xpat/src/scanner.rs +++ b/sub/xpat/src/scanner.rs @@ -197,26 +197,32 @@ pub fn exec( Atom::ReadU8(slot) => { let Some(value) = read::<_, u8>(bin, cursor) else { return None }; if let Some(slot) = saves.get_mut(slot as usize) { *slot = value as _ } + cursor = cursor.wrapping_add(1) } Atom::ReadI8(slot) => { let Some(value) = read::<_, i8>(bin, cursor) else { return None }; if let Some(slot) = saves.get_mut(slot as usize) { *slot = value as _ } + cursor = cursor.wrapping_add(1) } Atom::ReadU16(slot) => { let Some(value) = read::<_, u16>(bin, cursor) else { return None }; if let Some(slot) = saves.get_mut(slot as usize) { *slot = value as _ } + cursor = cursor.wrapping_add(2) } Atom::ReadI16(slot) => { let Some(value) = read::<_, i16>(bin, cursor) else { return None }; if let Some(slot) = saves.get_mut(slot as usize) { *slot = value as _ } + cursor = cursor.wrapping_add(2) } Atom::ReadU32(slot) => { let Some(value) = read::<_, u32>(bin, cursor) else { return None }; if let Some(slot) = saves.get_mut(slot as usize) { *slot = value as _ } + cursor = cursor.wrapping_add(4) } Atom::ReadI32(slot) => { let Some(value) = read::<_, i32>(bin, cursor) else { return None }; if let Some(slot) = saves.get_mut(slot as usize) { *slot = value as _ } + cursor = cursor.wrapping_add(4) } Atom::Zero(slot) => { if let Some(slot) = saves.get_mut(slot as usize) {