Need to clear tty context before using it.

This commit is contained in:
nicm 2017-05-12 13:29:05 +00:00
parent 5d3cf2ff15
commit ffd8beb6f6

View File

@ -390,6 +390,8 @@ screen_write_initctx(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx)
{ {
struct screen *s = ctx->s; struct screen *s = ctx->s;
memset(ttyctx, 0, sizeof *ttyctx);
ttyctx->wp = ctx->wp; ttyctx->wp = ctx->wp;
ttyctx->ocx = s->cx; ttyctx->ocx = s->cx;