diff options
author | rubidium <rubidium@openttd.org> | 2008-09-29 16:27:02 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-09-29 16:27:02 +0000 |
commit | e7829c1a57014f8b40b4972ab5b45dbcf4bb067d (patch) | |
tree | 43b0c8873ef3d08bb3099e46a3bc152bc8cd010d /src/gamelog.cpp | |
parent | a25d9bcc8b771e365097d96a459bca1b36c53408 (diff) | |
download | openttd-e7829c1a57014f8b40b4972ab5b45dbcf4bb067d.tar.xz |
(svn r14414) -Fix: replace instances of strncpy with strecpy as strncpy doesn't guarantee the resulting string is '\0'-terminated.
Diffstat (limited to 'src/gamelog.cpp')
-rw-r--r-- | src/gamelog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gamelog.cpp b/src/gamelog.cpp index 029f43b70..b57f7a47a 100644 --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -394,7 +394,7 @@ void GamelogRevision() LoggedChange *lc = GamelogChange(GLCT_REVISION); if (lc == NULL) return; - strncpy(lc->revision.text, _openttd_revision, lengthof(lc->revision.text)); + strecpy(lc->revision.text, _openttd_revision, lastof(lc->revision.text)); lc->revision.slver = SAVEGAME_VERSION; lc->revision.modified = _openttd_revision_modified; lc->revision.newgrf = _openttd_newgrf_version; |