diff options
author | wrmr | 2025-08-30 04:04:25 -0400 |
---|---|---|
committer | wrmr | 2025-08-30 04:04:25 -0400 |
commit | 36896aea8f2502fb8100958ab5884edbc078d330 (patch) | |
tree | 22f0e33affbde5a3830c5bdae166dd50b9641273 /main.c | |
parent | a98597527edf3a9df88d8b3cbb22ef972b40969a (diff) |
fix gfx_draw_pic using byte count instead of width
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -552,7 +552,7 @@ void gfx_draw_pic(Pic *pfp, int y, int x, int max_lines, int max_cols, PicDrawFl int w = 0; int h = MIN(pfp->lines, max_lines); for (int i = 0; i < h; i++) { - w = MAX(w, MIN(pfp->line[i].n, max_cols)); + w = MAX(w, MIN(fast_utf8_width(pfp->line[i]), max_cols)); } if (f & PIC_CTR_X) x -= w >> 1; if (f & PIC_CTR_Y) y -= h >> 1; |