patch 8.2.5075: clang gives an out of bounds warning
Problem: Clang gives an out of bounds warning.
Solution: adjust conditional expression (John Marriott)
diff --git a/src/ui.c b/src/ui.c
index 08664bf..8368c30 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -897,7 +897,8 @@
maxlen = inbufcount;
mch_memmove(buf, inbuf, (size_t)maxlen);
inbufcount -= maxlen;
- if (inbufcount)
+ // check "maxlen" to avoid clang warning
+ if (inbufcount > 0 && maxlen > 0)
mch_memmove(inbuf, inbuf + maxlen, (size_t)inbufcount);
return (int)maxlen;
}
diff --git a/src/version.c b/src/version.c
index a2a2d75..d86a23d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 5075,
+/**/
5074,
/**/
5073,