summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-21 09:59:58 +0100
committerwm4 <wm4@nowhere>2014-11-21 09:59:58 +0100
commit86b521f7dfac8aa6a8edf030ce8fe987fb13a104 (patch)
tree6f1465728ddae55cf71d89c699b2aaf4d6cc3f6b /misc
parente082c2c3dfced1cd20d7c1cb7ee7a661dffc8686 (diff)
downloadmpv-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.c2
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++) {