Suppress warnings for strncat()

`strncat()` also needs `'\0'`.
This commit is contained in:
dearblue
2019-08-18 15:46:17 +09:00
parent 83dab1ee0d
commit 74395d7577
+2 -2
View File
@@ -5020,10 +5020,10 @@ parser_yylex(parser_state *p)
}
if (c2) {
char buf[256];
char cc = (char)c2;
char cc[] = { (char)c2, '\0' };
strcpy(buf, "invalid character syntax; use ?\\");
strncat(buf, &cc, 1);
strncat(buf, cc, 2);
yyerror(p, buf);
}
}