summaryrefslogtreecommitdiff
path: root/src/basic/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/util.c')
-rw-r--r--src/basic/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index 3e90456dd3..3989b415fa 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -5913,9 +5913,11 @@ int extract_first_word(const char **p, char **ret, const char *separators, Extra
break;
case DOUBLE_QUOTE:
- if (c == 0)
+ if (c == 0) {
+ if (flags & EXTRACT_RELAX)
+ goto finish_force_terminate;
return -EINVAL;
- else if (c == '\"')
+ } else if (c == '\"')
state = VALUE;
else if (c == '\\')
state = DOUBLE_QUOTE_ESCAPE;