* Re-add the cx->torender trick to avoid crashing on filters. This really
needs some architecture thinking.
This commit is contained in:
parent
ec08c3d6c0
commit
71ab147f05
2 changed files with 6 additions and 2 deletions
|
@ -59,7 +59,10 @@ static int feed_figlet(context_t *cx, uint32_t ch, uint32_t attr)
|
|||
|
||||
static int flush_figlet(context_t *cx)
|
||||
{
|
||||
return cucul_flush_figlet(cx->cv);
|
||||
int ret = cucul_flush_figlet(cx->cv);
|
||||
cx->torender = cx->cv;
|
||||
cx->cv = cucul_create_canvas(0, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int end_figlet(context_t *cx)
|
||||
|
|
|
@ -156,11 +156,12 @@ static int render_flush(context_t *cx)
|
|||
filter_do(cx);
|
||||
|
||||
/* Output line */
|
||||
buffer = cucul_export_memory(cx->cv, cx->export, &len);
|
||||
buffer = cucul_export_memory(cx->torender, cx->export, &len);
|
||||
if(!buffer)
|
||||
return -1;
|
||||
fwrite(buffer, len, 1, stdout);
|
||||
free(buffer);
|
||||
cucul_free_canvas(cx->torender);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue