Commit 687312e
committed
samples: input: draw_touch_events: avoid avoid OOB writes
When CROSS_DIM doesn’t evenly divide the panel WIDTH/HEIGHT, the last
tile on the right/bottom edge can extend past the display bounds.
Fix by clipping the edge tiles.
Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>1 parent 2a09063 commit 687312e
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
| |||
0 commit comments