Throw an error when specifying an invalid pointer argument (-p) (Thanks TrickSTer)

pull/1/head
Michael Stapelberg 2011-09-25 13:26:51 +01:00
parent c81f8e8284
commit 5932ee24a7
1 changed files with 3 additions and 2 deletions

View File

@ -386,9 +386,10 @@ int main(int argc, char *argv[]) {
case 'p':
if (!strcmp(optarg, "win")) {
curs_choice = CURS_WIN;
}
if (!strcmp(optarg, "default")) {
} else if (!strcmp(optarg, "default")) {
curs_choice = CURS_DEFAULT;
} else {
errx(1, "i3lock: Invalid pointer type given. Expected one of \"win\" or \"default\".\n");
}
break;
default: