diff options
author | B. Watson <urchlay@slackware.uk> | 2024-12-16 16:39:21 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-12-16 16:39:21 -0500 |
commit | 8ce66856f9e946a08593002672aa017a6e883e54 (patch) | |
tree | c80df9be31c67c759276514f57192c95f4e5bcae /uxd.c | |
parent | d0ca5c32cd0b3890725df7dd75a807217b8e1810 (diff) | |
download | uxd-8ce66856f9e946a08593002672aa017a6e883e54.tar.gz |
do not allow negative -l limit.
Diffstat (limited to 'uxd.c')
-rw-r--r-- | uxd.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -230,7 +230,12 @@ void parse_args(int argc, char **argv) { case 'b': bold = 1; break; case 'l': - limit = parse_number(opt, optarg); break; + limit = parse_number(opt, optarg); + if(limit < 0) { + fprintf(stderr, "%s: negative limit for -l not allowed.\n", self); + exit(1); + } + break; case 'r': hilite_multi = 1; break; case 'm': |