(svn r14560) -Fix [FS#2396](r14555): lengthof() can't be simply replaced by lastof() in some cases (part by Aali)

This commit is contained in:
smatz
2008-11-03 12:03:00 +00:00
parent 808d9255a8
commit 7dd0b0dc07
2 changed files with 4 additions and 4 deletions

View File

@@ -154,7 +154,7 @@ static const char *convert_tofrom_fs(iconv_t convd, const char *name)
size_t outlen = sizeof(buf) - 1;
size_t inlen = strlen(name);
strecpy(outbuf, name, lastof(buf));
strecpy(outbuf, name, outbuf + outlen);
iconv(convd, NULL, NULL, NULL, NULL);
if (iconv(convd, &inbuf, &inlen, &outbuf, &outlen) == (size_t)(-1)) {