diff options
author | shdown <shdownnine@gmail.com> | 2014-10-16 17:29:33 +0400 |
---|---|---|
committer | Alessandro Ghedini <alessandro@ghedini.me> | 2014-10-18 15:04:46 +0200 |
commit | 919540ce8e889e08c0b5f2235b36136f80cb0d6e (patch) | |
tree | 5db7177ca193559cd31bdbdf223f767592316d00 | |
parent | ad9d1a3fb70b32fe0287a5e4364019ac398fbf99 (diff) | |
download | mpv-919540ce8e889e08c0b5f2235b36136f80cb0d6e.tar.bz2 mpv-919540ce8e889e08c0b5f2235b36136f80cb0d6e.tar.xz |
common: fix \x-style escaping
This was rejecting correct escapes and accepting incorrect ones.
-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); |