From 2c980131502bc2958956d6c2bd4bf2427cf101c7 Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 24 Feb 2020 19:40:01 -0500 Subject: [PATCH] python: fix up seqnum reference --- python/src/notcurses/build_notcurses.py | 2 +- src/lib/render.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/python/src/notcurses/build_notcurses.py b/python/src/notcurses/build_notcurses.py index 267489aa7..7a60c0121 100644 --- a/python/src/notcurses/build_notcurses.py +++ b/python/src/notcurses/build_notcurses.py @@ -85,7 +85,7 @@ typedef struct ncinput { bool shift; bool alt; bool ctrl; - uint64_t sequm; + uint64_t seqnum; } ncinput; int ncplane_set_base_cell(struct ncplane* ncp, const cell* c); int ncplane_set_base(struct ncplane* ncp, uint64_t channels, uint32_t attrword, const char* egc); diff --git a/src/lib/render.c b/src/lib/render.c index ed7d987ff..7d592a2f4 100644 --- a/src/lib/render.c +++ b/src/lib/render.c @@ -947,12 +947,13 @@ int notcurses_refresh(notcurses* nc){ if(term_emit("clear", nc->clearscr, nc->ttyfp, true)){ return -1; } - struct crender* rvec = malloc(sizeof(struct crender) * nc->lfdimx * nc->lfdimy); + const size_t size = sizeof(struct crender) * nc->lfdimx * nc->lfdimy; + struct crender* rvec = malloc(size); if(rvec == NULL){ return -1; } + memset(rvec, 0, size); for(int i = 0 ; i < nc->lfdimy * nc->lfdimx ; ++i){ - memset(rvec + i, 0, sizeof(*rvec)); rvec->damaged = true; } int ret = notcurses_rasterize(nc, rvec);