aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/routines.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/routines.c b/src/routines.c
index 7a434f7..09916aa 100644
--- a/src/routines.c
+++ b/src/routines.c
@@ -183,6 +183,7 @@ char *gen_password(int length)
for(i = 0; i < length; i++)
password[i] = allowed_chars[rand() % NUMBER_ALLOWED_CHARS];
+ password[i] = '\0';
return password;
}