diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index a239a5af3..405231cd2 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -2352,8 +2352,10 @@ int notcurses_lex_scalemode(const char* op, ncscale_e* scalemode){ *scalemode = NCSCALE_SCALE; }else if(strcasecmp(op, "none") == 0){ *scalemode = NCSCALE_NONE; + }else{ + return -1; } - return -1; + return 0; } const char* notcurses_str_scalemode(ncscale_e scalemode){ diff --git a/src/view/view.cpp b/src/view/view.cpp index c3f2c3e76..4fe894daa 100644 --- a/src/view/view.cpp +++ b/src/view/view.cpp @@ -138,7 +138,8 @@ auto handle_opts(int argc, char** argv, notcurses_options& opts, break; case 's': if(notcurses_lex_scalemode(optarg, scalemode)){ - std::cerr << "Scaling type should be one of stretch, scale, none" << std::endl; + std::cerr << "Scaling type should be one of stretch, scale, none (got " + << optarg << ")" << std::endl; usage(std::cerr, argv[0], EXIT_FAILURE); } break;