summaryrefslogtreecommitdiff
path: root/src/basic/extract-word.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/extract-word.c')
-rw-r--r--src/basic/extract-word.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/basic/extract-word.c b/src/basic/extract-word.c
index 23e3d557c0..1b3123bb7d 100644
--- a/src/basic/extract-word.c
+++ b/src/basic/extract-word.c
@@ -106,21 +106,19 @@ int extract_first_word(const char **p, char **ret, const char *separators, Extra
if (flags & EXTRACT_CUNESCAPE_RELAX) {
s[sz++] = '\\';
s[sz++] = c;
- goto end_escape;
- }
- return -EINVAL;
+ } else
+ return -EINVAL;
+ } else {
+ (*p) += r - 1;
+
+ if (c != 0)
+ s[sz++] = c; /* normal explicit char */
+ else
+ sz += utf8_encode_unichar(s + sz, u); /* unicode chars we'll encode as utf8 */
}
-
- (*p) += r - 1;
-
- if (c != 0)
- s[sz++] = c; /* normal explicit char */
- else
- sz += utf8_encode_unichar(s + sz, u); /* unicode chars we'll encode as utf8 */
} else
s[sz++] = c;
-end_escape:
backslash = false;
} else if (quote) { /* inside either single or double quotes */