summaryrefslogtreecommitdiff
path: root/src/libstddjb/string_unquote_withdelim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/string_unquote_withdelim.c')
-rw-r--r--src/libstddjb/string_unquote_withdelim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstddjb/string_unquote_withdelim.c b/src/libstddjb/string_unquote_withdelim.c
index 43da0db..16da0c7 100644
--- a/src/libstddjb/string_unquote_withdelim.c
+++ b/src/libstddjb/string_unquote_withdelim.c
@@ -33,7 +33,7 @@ int string_unquote_withdelim (char *d, size_t *w, char const *s, size_t len, siz
{ 6, 6, 4, 6, 4, 4, 6, 6, 6 },
{ 6, 6, 0, 6, 0, 0, 6, 6, 6 }
} ;
- unsigned char class[256] = "7777777777777777777777777777777777777777777777772555555555777777777777777777777777777777777707777445554777777767776767673777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" ;
+ unsigned char class[256] = "7777777777777777777777777777777777777777777777772555555555777777777777777777777777777777777707777445554777777767776667673777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777" ;
size_t i = 0 ;
unsigned char store = 0 ;
unsigned char state = 0 ;
@@ -50,7 +50,7 @@ int string_unquote_withdelim (char *d, size_t *w, char const *s, size_t len, siz
state = states[state][c] ;
if (action & PUSH0) d[(*w)++] = 0 ;
if (action & PUSH) d[(*w)++] = s[i] ;
- if (action & PUSHSPEC) d[(*w)++] = 7 + byte_chr("abtnvfr", 7, s[i]) ;
+ if (action & PUSHSPEC) d[(*w)++] = s[i] == 's' ? ' ' : 7 + byte_chr("abtnvfr", 7, s[i]) ;
if (action & STORE) store = fmtscan_num(s[i], 16) << 4 ;
if (action & CALC) d[(*w)++] = store | fmtscan_num(s[i], 16) ;
if (action & SYNTAXERROR) errno = EPROTO ;