mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
notcurses_init: properly check flags for unknowns
This commit is contained in:
parent
3668b201af
commit
6e7996f1a8
@ -735,7 +735,7 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){
|
||||
fprintf(stderr, "Provided an illegal negative margin, refusing to start\n");
|
||||
return NULL;
|
||||
}
|
||||
if(opts->flags > NCOPTION_NO_ALTERNATE_SCREEN){
|
||||
if(opts->flags > (NCOPTION_NO_ALTERNATE_SCREEN << 1u)){
|
||||
fprintf(stderr, "Provided an illegal Notcurses option, refusing to start\n");
|
||||
return NULL;
|
||||
}
|
||||
|
@ -16,6 +16,9 @@ int main(int argc, char** argv){
|
||||
.flags = NCOPTION_INHIBIT_SETLOCALE | NCOPTION_NO_ALTERNATE_SCREEN,
|
||||
};
|
||||
struct notcurses* nc = notcurses_init(&nopts, NULL);
|
||||
if(nc == NULL){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
struct ncplane* std = notcurses_stdplane(nc);
|
||||
// FIXME not all work yet; this subset does
|
||||
const int blitters[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user