python: fix up seqnum reference

This commit is contained in:
nick black 2020-02-24 19:40:01 -05:00
parent 519f77dd7f
commit 2c98013150
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 4 additions and 3 deletions

View File

@ -85,7 +85,7 @@ typedef struct ncinput {
bool shift; bool shift;
bool alt; bool alt;
bool ctrl; bool ctrl;
uint64_t sequm; uint64_t seqnum;
} ncinput; } ncinput;
int ncplane_set_base_cell(struct ncplane* ncp, const cell* c); 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); int ncplane_set_base(struct ncplane* ncp, uint64_t channels, uint32_t attrword, const char* egc);

View File

@ -947,12 +947,13 @@ int notcurses_refresh(notcurses* nc){
if(term_emit("clear", nc->clearscr, nc->ttyfp, true)){ if(term_emit("clear", nc->clearscr, nc->ttyfp, true)){
return -1; 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){ if(rvec == NULL){
return -1; return -1;
} }
memset(rvec, 0, size);
for(int i = 0 ; i < nc->lfdimy * nc->lfdimx ; ++i){ for(int i = 0 ; i < nc->lfdimy * nc->lfdimx ; ++i){
memset(rvec + i, 0, sizeof(*rvec));
rvec->damaged = true; rvec->damaged = true;
} }
int ret = notcurses_rasterize(nc, rvec); int ret = notcurses_rasterize(nc, rvec);