aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/gp32/gp32std_grap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/gp32/gp32std_grap.cpp b/backends/gp32/gp32std_grap.cpp
index 63eb3862d1..820d68f9ee 100644
--- a/backends/gp32/gp32std_grap.cpp
+++ b/backends/gp32/gp32std_grap.cpp
@@ -46,7 +46,8 @@ void gp_putBitmap8x16(uint16 *frameBuffer, int x, int y, byte *lpBitmap, uint16
byte data = *pBitmap++;
for (int nCol = 0; nCol < 7; nCol ++) {
if (data & 0x80)
- gpd_drawPixel16(frameBuffer, x + nCol, y + nRow, wColor);
+ if(x + nCol >= 0 && y + nRow >= 0 && x + nCol < 320 && y + nRow < 240)
+ gpd_drawPixel16(frameBuffer, x + nCol, y + nRow, wColor);
data <<= 1;
}