Commit d3f82e3a authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix connect engine crashes in buildbot tests on Win64.

Do not truncate pointers returned by _findfirst to int.
parent b56262f6
......@@ -711,7 +711,7 @@ int TDBDIR::GetMaxSize(PGLOBAL g)
if (MaxSize < 0) {
int n = -1;
#if defined(__WIN__)
int h;
intptr_t h;
// Start searching files in the target directory.
h = _findfirst(Path(g), &FileData);
......@@ -1007,7 +1007,7 @@ int TDBSDR::FindInDir(PGLOBAL g)
// Start searching files in the target directory.
#if defined(__WIN__)
int h = _findfirst(Path(g), &FileData);
intptr_t h = _findfirst(Path(g), &FileData);
if (h != -1) {
for (n = 1;; n++)
......
......@@ -134,7 +134,7 @@ class TDBDIR : public TDBASE {
int iFile; // Index of currently retrieved file
#if defined(__WIN__)
_finddata_t FileData; // Find data structure
int Hsearch; // Search handle
intptr_t Hsearch; // Search handle
char Drive[_MAX_DRIVE]; // Drive name
#else // !__WIN__
struct stat Fileinfo; // File info structure
......@@ -184,7 +184,7 @@ class TDBSDR : public TDBDIR {
struct _Sub_Dir *Next;
struct _Sub_Dir *Prev;
#if defined(__WIN__)
int H; // Search handle
intptr_t H; // Search handle
#else // !__WIN__
DIR *D;
#endif // !__WIN__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment