diff options
author | rubidium <rubidium@openttd.org> | 2014-04-23 21:30:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-04-23 21:30:32 +0000 |
commit | ce0613932861cbce673bcd153a0004fd9e1d288c (patch) | |
tree | d84a32aadb88b02650eeff7c727ba1327c270d56 /src | |
parent | 21f991e2353d99064555acf7996b51c46bbd44a5 (diff) | |
download | openttd-ce0613932861cbce673bcd153a0004fd9e1d288c.tar.xz |
(svn r26490) -Fix (r26489): compilation under Windows
Diffstat (limited to 'src')
-rw-r--r-- | src/os/windows/win32.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 66d7207df..011c8e53c 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -212,7 +212,7 @@ void FiosGetDrives() FiosItem *fios = _fios_items.Append(); fios->type = FIOS_TYPE_DRIVE; fios->mtime = 0; - snprintf(fios->name, lengthof(fios->name), PATHSEP ""); + seprintf(fios->name, lastof(fios->name), PATHSEP ""); strecpy(fios->title, fios->name, lastof(fios->title)); #else TCHAR drives[256]; @@ -223,7 +223,7 @@ void FiosGetDrives() FiosItem *fios = _fios_items.Append(); fios->type = FIOS_TYPE_DRIVE; fios->mtime = 0; - snprintf(fios->name, lengthof(fios->name), "%c:", s[0] & 0xFF); + seprintf(fios->name, lastof(fios->name), "%c:", s[0] & 0xFF); strecpy(fios->title, fios->name, lastof(fios->title)); while (*s++ != '\0') { /* Nothing */ } } @@ -495,9 +495,9 @@ void DetermineBasePaths(const char *exe) #ifdef WITH_PERSONAL_DIR if (SUCCEEDED(OTTDSHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, path))) { strecpy(tmp, FS2OTTD(path), lastof(tmp)); - AppendPathSeparator(tmp, MAX_PATH); + AppendPathSeparator(tmp, lastof(tmp)); strecat(tmp, PERSONAL_DIR, lastof(tmp)); - AppendPathSeparator(tmp, MAX_PATH); + AppendPathSeparator(tmp, lastof(tmp)); _searchpaths[SP_PERSONAL_DIR] = strdup(tmp); } else { _searchpaths[SP_PERSONAL_DIR] = NULL; @@ -505,9 +505,9 @@ void DetermineBasePaths(const char *exe) if (SUCCEEDED(OTTDSHGetFolderPath(NULL, CSIDL_COMMON_DOCUMENTS, NULL, SHGFP_TYPE_CURRENT, path))) { strecpy(tmp, FS2OTTD(path), lastof(tmp)); - AppendPathSeparator(tmp, MAX_PATH); + AppendPathSeparator(tmp, lastof(tmp)); strecat(tmp, PERSONAL_DIR, lastof(tmp)); - AppendPathSeparator(tmp, MAX_PATH); + AppendPathSeparator(tmp, lastof(tmp)); _searchpaths[SP_SHARED_DIR] = strdup(tmp); } else { _searchpaths[SP_SHARED_DIR] = NULL; @@ -519,7 +519,7 @@ void DetermineBasePaths(const char *exe) /* Get the path to working directory of OpenTTD */ getcwd(tmp, lengthof(tmp)); - AppendPathSeparator(tmp, MAX_PATH); + AppendPathSeparator(tmp, lastof(tmp)); _searchpaths[SP_WORKING_DIR] = strdup(tmp); if (!GetModuleFileName(NULL, path, lengthof(path))) { |