fix warnings for gcc 10 and clang 10

This commit is contained in:
aurhat
2021-10-05 22:12:49 +02:00
parent 4aa520515c
commit fcd0fd8980
9 changed files with 27 additions and 11 deletions
+1 -1
View File
@@ -633,7 +633,7 @@ bool textinputbuffer::say(const char *c)
int buflen = (int)strlen(buf), txtlen = (int)strlen(txt);
if(txtlen && buflen < maxlen() && buflen + txtlen < (int)sizeof(buf))
{
if(pos < 0) strncpy(buf + buflen, txt, txtlen);
if(pos < 0) memcpy(buf + buflen, txt, txtlen);
else
{
memmove(&buf[pos + txtlen], &buf[pos], buflen - pos);