summaryrefslogtreecommitdiff
path: root/src/unix.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-11-03 12:03:00 +0000
committersmatz <smatz@openttd.org>2008-11-03 12:03:00 +0000
commit7dd0b0dc07d4d5323ad229b064c5fd9e1fd44f61 (patch)
tree16127a8285818a7076c8ba1bf7d5edb72489c260 /src/unix.cpp
parent808d9255a8e68fa34bdb51eccdd4db4a347268ed (diff)
downloadopenttd-7dd0b0dc07d4d5323ad229b064c5fd9e1fd44f61.tar.xz
(svn r14560) -Fix [FS#2396](r14555): lengthof() can't be simply replaced by lastof() in some cases (part by Aali)
Diffstat (limited to 'src/unix.cpp')
-rw-r--r--src/unix.cpp2
1 files changed, 1 insertions, 1 deletions
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)) {