summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/mkha1.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/mkha1.c b/tools/mkha1.c
index 3124e48..5ac3fd3 100644
--- a/tools/mkha1.c
+++ b/tools/mkha1.c
@@ -100,6 +100,12 @@ static char* check_value(ha_buffer_t* buf, char* value, const char* name)
printf("%s: ", name);
fgets(t, 256, stdin);
value = t;
+
+ t = value + strlen(value);
+
+ /* Remove any new lines from end */
+ while(t > value && (*(t - 1) == '\n' || *(t - 1) == '\r'))
+ *(--t) = 0;
}
if(value[0] == 0)