Commit 1878509
fw/applib/graphics: fix bitblt overflow for display widths > 255
The `row_bits_left` variable in the tiled bitblt functions was declared
as `uint8_t`, causing silent truncation when `dest_rect.size.w` exceeds
255 pixels. On Gabbro (260x260), this truncates 260 to 4, which triggers
a PBL_ASSERTN crash in `bitblt_bitmap_into_bitmap_tiled_1bit_to_8bit`
when the scroll layer draws its 1-bit shadow bitmaps.
Change the type to `int16_t` to match `dest_rect.size.w` (GRect uses
int16_t for dimensions).
Fixes #903
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>1 parent 65ed91f commit 1878509
File tree
3 files changed
+3
-3
lines changed- src/fw/applib/graphics
- 1_bit
- 8_bit
3 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
0 commit comments