kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Fix buffer overrun on out of bounds rectangle height/width
rodzic
16bfa467ce
commit
a4acf4b94e
|
@ -225,6 +225,12 @@ namespace pimoroni {
|
|||
}
|
||||
w += _thickness - 1;
|
||||
h += _thickness - 1;
|
||||
if (x + w > 296) {
|
||||
w = 296 - x;
|
||||
}
|
||||
if (y + h > 128) {
|
||||
h = 128 - y;
|
||||
}
|
||||
|
||||
if (h >= 8) {
|
||||
// Directly write to the frame buffer when clearing a large area
|
||||
|
|
Ładowanie…
Reference in New Issue