mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 22:40:50 +00:00
Use MAX_OSPATH instead of MAX_QPATH.
Those are external pathes, not internal ones. MAX_QPATH with only 64 characters is much to small for them.
This commit is contained in:
parent
0eca30cb96
commit
e8c3686e4c
1 changed files with 6 additions and 6 deletions
|
@ -334,8 +334,8 @@ Sys_FindFirst(char *path, unsigned musthave, unsigned canthave)
|
||||||
|
|
||||||
COM_FilePath(path, findbase);
|
COM_FilePath(path, findbase);
|
||||||
|
|
||||||
WCHAR wpath[MAX_QPATH] = {0};
|
WCHAR wpath[MAX_OSPATH] = {0};
|
||||||
MultiByteToWideChar(CP_UTF8, 0, path, -1, wpath, MAX_QPATH);
|
MultiByteToWideChar(CP_UTF8, 0, path, -1, wpath, MAX_OSPATH);
|
||||||
|
|
||||||
WIN32_FIND_DATAW findinfo;
|
WIN32_FIND_DATAW findinfo;
|
||||||
findhandle = FindFirstFileW(wpath, &findinfo);
|
findhandle = FindFirstFileW(wpath, &findinfo);
|
||||||
|
@ -345,8 +345,8 @@ Sys_FindFirst(char *path, unsigned musthave, unsigned canthave)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CHAR cFileName[MAX_QPATH];
|
CHAR cFileName[MAX_OSPATH];
|
||||||
WideCharToMultiByte(CP_UTF8, 0, findinfo.cFileName, -1, cFileName, MAX_QPATH, NULL, NULL);
|
WideCharToMultiByte(CP_UTF8, 0, findinfo.cFileName, -1, cFileName, MAX_OSPATH, NULL, NULL);
|
||||||
|
|
||||||
Com_sprintf(findpath, sizeof(findpath), "%s/%s", findbase, cFileName);
|
Com_sprintf(findpath, sizeof(findpath), "%s/%s", findbase, cFileName);
|
||||||
return findpath;
|
return findpath;
|
||||||
|
@ -367,8 +367,8 @@ Sys_FindNext(unsigned musthave, unsigned canthave)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CHAR cFileName[MAX_QPATH];
|
CHAR cFileName[MAX_OSPATH];
|
||||||
WideCharToMultiByte(CP_UTF8, 0, findinfo.cFileName, -1, cFileName, MAX_QPATH, NULL, NULL);
|
WideCharToMultiByte(CP_UTF8, 0, findinfo.cFileName, -1, cFileName, MAX_OSPATH, NULL, NULL);
|
||||||
|
|
||||||
Com_sprintf(findpath, sizeof(findpath), "%s/%s", findbase, cFileName);
|
Com_sprintf(findpath, sizeof(findpath), "%s/%s", findbase, cFileName);
|
||||||
return findpath;
|
return findpath;
|
||||||
|
|
Loading…
Reference in a new issue