We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a90abba + 19689b4 commit d014b28Copy full SHA for d014b28
libraries/pico_graphics/pico_graphics_pen_p4.cpp
@@ -70,6 +70,10 @@ namespace pimoroni {
70
}
71
72
void PicoGraphics_PenP4::set_pixel_span(const Point &p, uint l) {
73
+ // prevent a zero length span causing an overflow in 'l'
74
+ // and trying to write 2GB of pixels.
75
+ if (l == 0) {return;}
76
+
77
auto i = (p.x + p.y * bounds.w);
78
79
// pointer to byte in framebuffer that contains this pixel
0 commit comments