diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-10-02 18:55:10 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-10-09 05:44:13 +0000 |
| commit | 96405c2ca97aed6bb126a5a39d81b97100743b78 (patch) | |
| tree | 1ff585124e0e82503b0c7649bbea05101b448e95 /sixel.c | |
| parent | sixel: fold long line (diff) | |
sixel: overwrite-by-rectangle expects ‘width’ to not exceed screen
This fixes a crash when the emitted sixel extends beyond the right
margin. The crash only happens when there are other sixel images
already emitted.
Fixes part of #151
Diffstat (limited to 'sixel.c')
| -rw-r--r-- | sixel.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -482,7 +482,8 @@ sixel_unhook(struct terminal *term) }; sixel_overwrite_by_rectangle( - term, cursor->row, image.pos.col, image.rows, image.cols); + term, cursor->row, image.pos.col, + image.rows, min(image.cols, term->cols - image.pos.col)); LOG_DBG("generating %dx%d pixman image at %d-%d", image.width, image.height, |
