mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
panic example for integer overflow
This commit is contained in:
parent
2d075bebb9
commit
87c8ec9c38
|
@ -18,5 +18,9 @@ fn main(_argc: isize, _argv: *const *const u8) -> isize {
|
||||||
if input.is_just_pressed(gba::input::Button::A) {
|
if input.is_just_pressed(gba::input::Button::A) {
|
||||||
bitmap.draw_point(display::WIDTH, 0, 0x05);
|
bitmap.draw_point(display::WIDTH, 0, 0x05);
|
||||||
}
|
}
|
||||||
|
if input.is_just_pressed(gba::input::Button::B) {
|
||||||
|
#[allow(arithmetic_overflow)]
|
||||||
|
let p = core::i32::MAX + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue