use memcpy rather than strncpy to avoid compiler warning

This commit is contained in:
Richard Frith-Macdonald 2020-12-03 12:29:53 -05:00
parent 679272b50c
commit 8141fe03f7

View file

@ -338,8 +338,8 @@ static void GSSetupEncodingTable(void)
*/
l = strlen(entry->iconv);
lossy = malloc(l + 11);
strncpy(lossy, entry->iconv, l);
strncpy(lossy + l, "//TRANSLIT", 11);
memcpy(lossy, entry->iconv, l);
memcpy(lossy + l, "//TRANSLIT", 11);
c = iconv_open(lossy, UNICODE_ENC);
if (c == (iconv_t)-1)
{