aboutsummaryrefslogtreecommitdiff
path: root/uxd.c
diff options
context:
space:
mode:
Diffstat (limited to 'uxd.c')
-rw-r--r--uxd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/uxd.c b/uxd.c
index 95a91bd..6ea3897 100644
--- a/uxd.c
+++ b/uxd.c
@@ -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':