Use better way to detect bp script end instruction

fix bgi dsc overflow in debug build
This commit is contained in:
2026-01-12 14:02:05 +08:00
parent 0a92233e6c
commit 0bba63d303
2 changed files with 20 additions and 12 deletions

View File

@@ -209,7 +209,7 @@ impl<'a> DscDecoder<'a> {
.0
.overflowing_add(self.key.overflowing_mul(346).0)
.0;
v1 = (v1 + (v0 >> 16)) & 0xffff;
v1 = overf::wrapping!(v1 + (v0 >> 16)) & 0xffff;
self.key = (v1 << 16) + (v0 & 0xffff) + 1;
v1 as u8
}