loglevel check: explicit against NCLOGLEVEL_SILENT rather than 0

pull/1978/head
nick black 3 years ago
parent b0eed357cf
commit 45dfb781c6
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -1087,7 +1087,7 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
ret->lfdimy = 0;
ret->lfdimx = 0;
egcpool_init(&ret->pool);
if((ret->loglevel = opts->loglevel) > NCLOGLEVEL_TRACE || ret->loglevel < 0){
if((ret->loglevel = opts->loglevel) > NCLOGLEVEL_TRACE || ret->loglevel < NCLOGLEVEL_SILENT){
fprintf(stderr, "Invalid loglevel %d\n", ret->loglevel);
free(ret);
return NULL;

Loading…
Cancel
Save