diff options
author | shdown <shdownnine@gmail.com> | 2014-10-16 17:29:33 +0400 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-16 21:17:01 +0200 |
commit | df6ded7c947ca0cc96219cb67768fdaf75d67ff0 (patch) | |
tree | 6062821193899750fb47188275f182d4c1d5f318 /common/common.c | |
parent | 040c5a9f6883e06889c7fa8b2ba8582e8521be16 (diff) | |
download | mpv-df6ded7c947ca0cc96219cb67768fdaf75d67ff0.tar.bz2 mpv-df6ded7c947ca0cc96219cb67768fdaf75d67ff0.tar.xz |
common: fix \x-style escaping
This was rejecting correct escapes and accepting incorrect ones.
Diffstat (limited to 'common/common.c')
-rw-r--r-- | common/common.c | 2 |
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); |