diff --git a/client/common/common.c b/client/common/common.c index e539d79..198cd05 100644 --- a/client/common/common.c +++ b/client/common/common.c @@ -363,7 +363,7 @@ do_getopt(struct client *client, int *argc, char **argv[]) { char *ptr; client->lines = strtol(optarg, &ptr, 10); - client->lines_mode = (!strcmp(ptr + 1, "up") ? BM_LINES_UP : BM_LINES_DOWN); + client->lines_mode = (*ptr && !strcmp(ptr + 1, "up") ? BM_LINES_UP : BM_LINES_DOWN); break; } case 'c':