diff options
author | rubidium <rubidium@openttd.org> | 2009-04-10 20:37:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-10 20:37:05 +0000 |
commit | bee930f9b3b9dad52945c1186227519cf9d566aa (patch) | |
tree | 4316044d109b49be7854ac19dd38cbc7d94367c1 /src/strgen | |
parent | 4bf35086802f6f778e987cf0a4ca377068cb27ed (diff) | |
download | openttd-bee930f9b3b9dad52945c1186227519cf9d566aa.tar.xz |
(svn r16024) -Codechange: harden string copying on places where it's possible
Diffstat (limited to 'src/strgen')
-rw-r--r-- | src/strgen/strgen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index 6bec63094..b769d55fe 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -1193,9 +1193,9 @@ static void WriteLangfile(const char *filename) hdr.text_dir = _lang_textdir; hdr.winlangid = TO_LE16(_lang_winlangid); hdr.newgrflangid = _lang_newgrflangid; - strcpy(hdr.name, _lang_name); - strcpy(hdr.own_name, _lang_ownname); - strcpy(hdr.isocode, _lang_isocode); + strecpy(hdr.name, _lang_name, lastof(hdr.name)); + strecpy(hdr.own_name, _lang_ownname, lastof(hdr.own_name)); + strecpy(hdr.isocode, _lang_isocode, lastof(hdr.isocode)); fwrite(&hdr, sizeof(hdr), 1, f); |