diff --git a/src/framebuffer.c b/src/framebuffer.c index 806d624..29f6b9d 100644 --- a/src/framebuffer.c +++ b/src/framebuffer.c @@ -19,5 +19,6 @@ void initfb(unsigned long addr, unsigned short w, unsigned short h, unsigned cha } void putpixel(unsigned short x, unsigned short y, unsigned char r, unsigned char g, unsigned char b, unsigned char a) { + if (x>fb_width || y> fb_height) return; *((unsigned long *)(fb_address + y*fb_pitch + x*fb_bytespp)) = r<