summaryrefslogtreecommitdiff
path: root/keymash.c
diff options
context:
space:
mode:
Diffstat (limited to 'keymash.c')
-rw-r--r--keymash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/keymash.c b/keymash.c
index d52a413..ab635e9 100644
--- a/keymash.c
+++ b/keymash.c
@@ -16,6 +16,10 @@ main (int argc, char *argv[]) {
return 1;
}
int keymashlength = atoi(argv[1]);
+ if (keymashlength <= 0) {
+ puts("Bad length >:(");
+ return 1;
+ }
char *keymash = malloc(keymashlength+1);
int r,total = 0;
char prev = 'a';