diff options
Diffstat (limited to 'src/ini.cpp')
-rw-r--r-- | src/ini.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ini.cpp b/src/ini.cpp index 2e4e9097f..ccce19239 100644 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -89,6 +89,8 @@ bool IniFile::SaveToDisk(const char *filename) #endif #if defined(WIN32) || defined(WIN64) + /* _tcsncpy = strcpy is TCHAR is char, but isn't when TCHAR is wchar. */ + #undef strncpy /* Allocate space for one more \0 character. */ TCHAR tfilename[MAX_PATH + 1], tfile_new[MAX_PATH + 1]; _tcsncpy(tfilename, OTTD2FS(filename), MAX_PATH); |