diff --git a/src/trekstor.rs b/src/trekstor.rs index 484541b..1aa551d 100644 --- a/src/trekstor.rs +++ b/src/trekstor.rs @@ -75,6 +75,11 @@ impl Platform for Trekstor { let x = (i % ctx.screen.width() as usize) as u32; let y = (i / ctx.screen.width() as usize) as u32; + if x >= ctx.screen.width() || y >= ctx.screen.height() { + println!("Out of bounds {} {}", x, y); + continue; + } + ctx.screen.framebuffer.set_pixel( x, y,