diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-01-03 11:05:48 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-01-03 11:05:48 +0000 |
| commit | 792b4439185808f90d25bf70ebc91deb4f30c003 (patch) | |
| tree | 128bd5a0d6cb6c5e1385c2586c5a0abaaa33b8d4 | |
| parent | fcft: ignore `embeddedbitmap` for non-scalable fonts (diff) | |
render: use a unique buffer cookie for the 'search' surface
This fixes an issue where rendering the 'search' box caused the last
normal buffer from being purged.
This meant the terminal had a pointer to a now freed buffer, which we
de-referenced and occasionally memcpy:ied from.
| -rw-r--r-- | render.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -886,7 +886,7 @@ render_search_box(struct terminal *term) const int width = min(term->width, 2 * margin + max(20, term->search.len) * term->cell_width); const int height = min(term->height, 2 * margin + 1 * term->cell_height); - unsigned long cookie = (uintptr_t)term; + unsigned long cookie = (uintptr_t)term + 1; struct buffer *buf = shm_get_buffer(term->wl->shm, width, height, cookie); /* Background - yellow on empty/match, red on mismatch */ |
