From 925d456de9181967f752a57edd03689ab5967782 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 17 Nov 2015 00:08:11 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/slibc-human/unescape.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slibc-human/unescape.c b/src/slibc-human/unescape.c index 6224c15..941ea9b 100644 --- a/src/slibc-human/unescape.c +++ b/src/slibc-human/unescape.c @@ -82,7 +82,7 @@ char* unescape(char* str, enum unescape_mode mode) if (str == NULL) return errno = 0, NULL; if (mode & ~31) goto invalid; - if (mod == 0) mode |= UNESCAPE_EINVAL | UNESCAPE_MOD_UTF8; + if (mode == 0) mode |= UNESCAPE_MOD_UTF8; switch (mode & 7) { case 0: @@ -156,7 +156,7 @@ char* unescape(char* str, enum unescape_mode mode) default: if (RANGE('0', *r, '7')) { - int v = *r - '0'; + v = *r - '0'; NEXT_OCTAL(v); NEXT_OCTAL(v); if (ASCII()); @@ -166,7 +166,7 @@ char* unescape(char* str, enum unescape_mode mode) #define X(e, i) else if (strstarts(r, e) ? (*w++ = i, r += sizeof(e) / sizeof(char) - 2, 1) : 0); LIST_ASCII_NAMES #undef X - else UNRECOGNISED(r--); + else UNRECOGNISED(*r, r--); break; } -- cgit v1.2.3-70-g09d2