correct order of parameters to calloc() from #2768

This commit is contained in:
nick black 2024-12-29 05:29:23 -05:00
parent bf5e74c872
commit 39700bf64a
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -602,7 +602,7 @@ ncplane* ncplane_new_internal(notcurses* nc, ncplane* n,
}
size_t fbsize = ncplane_sizeof_cellarray(p->leny, p->lenx);
if(!fbsize || (p->fb = calloc(sizeof(struct nccell),fbsize)) == NULL){
if(!fbsize || (p->fb = calloc(fbsize, sizeof(struct nccell))) == NULL){
logerror("error allocating cellmatrix (r=%u, c=%u)",
p->leny, p->lenx);
free(p);