Fixed Access Violation on Windows 10 (x64)

hFile should be defined as intptr_t to resolve 0xC0000005: Access Violation in ntdll.dll, as per https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/findnext-functions?redirectedfrom=MSDN&view=vs-2019
This commit is contained in:
Wojciech Zylinski 2020-08-18 01:29:39 +01:00 committed by GitHub
parent 0edb0bd6f7
commit da1a5d93fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -715,8 +715,8 @@ int ReadDataDirectory(const char *dirname, std::vector<FileList> &fl)
#else
strcat_s(buffer, sizeof(buffer), "*.*");
struct _finddata_t fileinfo;
long hFile = _findfirst(buffer, &fileinfo);
if (hFile != -1L) {
intptr_t hFile = _findfirst(buffer, &fileinfo);
if (hFile != -1) {
do {
filename = fileinfo.name;
#endif