Commit 49e74ba
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 49e74ba
1 file changed
+17
-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 | + | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
| |||
126 | 133 | | |
127 | 134 | | |
128 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
129 | 145 | | |
130 | 146 | | |
131 | 147 | | |
| |||
0 commit comments