diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2011-09-25 13:26:51 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2011-09-25 13:26:51 +0100 |
commit | 5932ee24a72e508875d094f4197d48d12085f872 (patch) | |
tree | ee68376c44cdaa3b23753012a854818a1ca19900 /i3lock.c | |
parent | c81f8e82841d587a7b62873a2dd71521562f73c1 (diff) |
Throw an error when specifying an invalid pointer argument (-p) (Thanks TrickSTer)
Diffstat (limited to 'i3lock.c')
-rw-r--r-- | i3lock.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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: |