From 7dd0b0dc07d4d5323ad229b064c5fd9e1fd44f61 Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 3 Nov 2008 12:03:00 +0000 Subject: (svn r14560) -Fix [FS#2396](r14555): lengthof() can't be simply replaced by lastof() in some cases (part by Aali) --- src/unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/unix.cpp') diff --git a/src/unix.cpp b/src/unix.cpp index 2e62b6399..047a7bda6 100644 --- a/src/unix.cpp +++ b/src/unix.cpp @@ -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)) { -- cgit v1.2.3-54-g00ecf