1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 09:29:10 +00:00

(svn r8824) -Fix (r8821): don't use MSVC2005 runtime library-only _snwprintf_s function, but use 'insecure/deprecated' version and zero-terminate string ourselves. Thanks for testing glx.

This commit is contained in:
Darkvater
2007-02-20 14:39:47 +00:00
parent 6d25481221
commit b00692dff6

View File

@@ -664,7 +664,8 @@ DIR *opendir(const wchar_t *path)
if (d != NULL) {
wchar_t search_path[MAX_PATH];
/* build search path for FindFirstFile */
_snwprintf_s(search_path, lengthof(search_path), L"%s\\*", path);
_snwprintf(search_path, lengthof(search_path), L"%s\\*", path);
*lastof(search_path) = '\0';
d->hFind = FindFirstFileW(search_path, &d->fd);
if (d->hFind != INVALID_HANDLE_VALUE ||