diff options
author | Darkvater <darkvater@openttd.org> | 2006-11-18 00:14:43 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-11-18 00:14:43 +0000 |
commit | c4d841dcdbabb1f600dce2f5c150e66fdc432f77 (patch) | |
tree | 75a3954c33043c724e452fafd6ef0b60291b6eb6 /win32.c | |
parent | 2754eeb98959e4f3ffa9c7aea6ba65314994df4b (diff) | |
download | openttd-c4d841dcdbabb1f600dce2f5c150e66fdc432f77.tar.xz |
(svn r7200) -Codechange: remove unneeded redraw (console.c), coding style, use FindWindowById
instead of _windows loop (viewport.c), remove dump-code (mixer.c), MSVC6 borkdness
in stdafx.h, constness (viewport.c), variable localization (win32.c), comments (window.c)
Diffstat (limited to 'win32.c')
-rw-r--r-- | win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -637,7 +637,6 @@ static inline void dir_free(DIR *d) DIR *opendir(const char *path) { - char search_path[MAX_PATH]; DIR *d; UINT sem = SetErrorMode(SEM_FAILCRITICALERRORS); // disable 'no-disk' message box DWORD fa = GetFileAttributes(path); @@ -645,6 +644,7 @@ DIR *opendir(const char *path) if ((fa != INVALID_FILE_ATTRIBUTES) && (fa & FILE_ATTRIBUTE_DIRECTORY)) { d = dir_calloc(); if (d != NULL) { + char search_path[MAX_PATH]; /* build search path for FindFirstFile */ snprintf(search_path, lengthof(search_path), "%s" PATHSEP "*", path); d->hFind = FindFirstFile(search_path, &d->fd); @@ -893,7 +893,7 @@ void DeterminePaths(void) GetCurrentDirectory(MAX_PATH - 1, cfg); cfg[0] = toupper(cfg[0]); - s = strchr(cfg, 0); + s = strchr(cfg, '\0'); if (s[-1] != '\\') strcpy(s, "\\"); _path.save_dir = str_fmt("%ssave", cfg); |