diff options
author | wm4 <wm4@nowhere> | 2014-11-21 09:59:58 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-21 09:59:58 +0100 |
commit | 86b521f7dfac8aa6a8edf030ce8fe987fb13a104 (patch) | |
tree | 6f1465728ddae55cf71d89c699b2aaf4d6cc3f6b /misc | |
parent | e082c2c3dfced1cd20d7c1cb7ee7a661dffc8686 (diff) | |
download | mpv-86b521f7dfac8aa6a8edf030ce8fe987fb13a104.tar.bz2 mpv-86b521f7dfac8aa6a8edf030ce8fe987fb13a104.tar.xz |
Silence some Coverity warnings
None of this really matters.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/bstr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/bstr.c b/misc/bstr.c index 7db7015e1c..bb8446d254 100644 --- a/misc/bstr.c +++ b/misc/bstr.c @@ -277,7 +277,7 @@ int bstr_decode_utf8(struct bstr s, struct bstr *out_next) s.start++; s.len--; if (codepoint >= 128) { int bytes = bstr_parse_utf8_code_length(codepoint); - if (bytes < 0 || s.len < bytes - 1) + if (bytes < 1 || s.len < bytes - 1) return -1; codepoint &= 127 >> bytes; for (int n = 1; n < bytes; n++) { |