summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshdown <shdownnine@gmail.com>2014-10-16 17:29:33 +0400
committerwm4 <wm4@nowhere>2014-10-16 21:17:01 +0200
commitdf6ded7c947ca0cc96219cb67768fdaf75d67ff0 (patch)
tree6062821193899750fb47188275f182d4c1d5f318
parent040c5a9f6883e06889c7fa8b2ba8582e8521be16 (diff)
downloadmpv-df6ded7c947ca0cc96219cb67768fdaf75d67ff0.tar.bz2
mpv-df6ded7c947ca0cc96219cb67768fdaf75d67ff0.tar.xz
common: fix \x-style escaping
This was rejecting correct escapes and accepting incorrect ones.
-rw-r--r--common/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/common.c b/common/common.c
index a74205dd92..449c95be26 100644
--- a/common/common.c
+++ b/common/common.c
@@ -171,7 +171,7 @@ static bool mp_parse_escape(void *talloc_ctx, bstr *dst, bstr *code)
if (code->start[0] == 'x' && code->len >= 3) {
bstr num = bstr_splice(*code, 1, 3);
char c = bstrtoll(num, &num, 16);
- if (!num.len)
+ if (num.len)
return false;
bstr_xappend(talloc_ctx, dst, (bstr){&c, 1});
*code = bstr_cut(*code, 3);