(svn r16024) -Codechange: harden string copying on places where it's possible

This commit is contained in:
rubidium
2009-04-10 20:37:05 +00:00
parent 4bf3508680
commit bee930f9b3
8 changed files with 16 additions and 16 deletions

View File

@@ -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);