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.
1 parent 32f2030 commit 34bf9caCopy full SHA for 34bf9ca
esp32/modfreedomgfx.c
@@ -59,7 +59,10 @@
59
#define imgSize (BADGE_EINK_WIDTH*BADGE_EINK_HEIGHT)
60
static uint8_t* img = 0;
61
62
-#define PX(x,y,v) img[((x)+(y)*BADGE_EINK_WIDTH)] = (v)
+#define PX(x,y,v) \
63
+ if( x>=0 && y>=0 && x < BADGE_EINK_WIDTH && y < BADGE_EINK_HEIGHT) \
64
+ img[((x)+(y)*BADGE_EINK_WIDTH)] = (v)
65
+
66
#define ABS(x) (((x)<0)?-(x):(x))
67
68
static void gfx_input_poll(uint32_t btn);
0 commit comments