From 166b05c2cae064cef888d80928ab8592648c5230 Mon Sep 17 00:00:00 2001 From: slioch Date: Wed, 27 Aug 2008 18:08:50 -0700 Subject: strip off whitespace in default value parsed from node.def file--fixes problem of deleting time-zone value without value. --- src/delete.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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"); } -- cgit v1.2.3