summaryrefslogtreecommitdiff
path: root/src/delete.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/delete.c')
-rw-r--r--src/delete.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/delete.c b/src/delete.c
index 004986d..6fe4eb3 100644
--- a/src/delete.c
+++ b/src/delete.c
@@ -47,7 +47,18 @@ static boolean has_default(char **def, int size)
if (buf_ptr == NULL) {
break;
}
+
+ //iterate up to non-whitespace character
buf_ptr++;
+ while (buf_ptr < (buf + size)) {
+ if (*buf_ptr == ' ') {
+ buf_ptr++;
+ }
+ else {
+ break;
+ }
+ }
+
if (size < strlen(buf_ptr)-1) {
bye("default buffer size is too small\n");
}