Skip to content

Commit d3f82e3

Browse files
committed
Fix connect engine crashes in buildbot tests on Win64.
Do not truncate pointers returned by _findfirst to int.
1 parent b56262f commit d3f82e3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

storage/connect/tabmul.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ int TDBDIR::GetMaxSize(PGLOBAL g)
711711
if (MaxSize < 0) {
712712
int n = -1;
713713
#if defined(__WIN__)
714-
int h;
714+
intptr_t h;
715715

716716
// Start searching files in the target directory.
717717
h = _findfirst(Path(g), &FileData);
@@ -1007,7 +1007,7 @@ int TDBSDR::FindInDir(PGLOBAL g)
10071007

10081008
// Start searching files in the target directory.
10091009
#if defined(__WIN__)
1010-
int h = _findfirst(Path(g), &FileData);
1010+
intptr_t h = _findfirst(Path(g), &FileData);
10111011

10121012
if (h != -1) {
10131013
for (n = 1;; n++)

storage/connect/tabmul.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class TDBDIR : public TDBASE {
134134
int iFile; // Index of currently retrieved file
135135
#if defined(__WIN__)
136136
_finddata_t FileData; // Find data structure
137-
int Hsearch; // Search handle
137+
intptr_t Hsearch; // Search handle
138138
char Drive[_MAX_DRIVE]; // Drive name
139139
#else // !__WIN__
140140
struct stat Fileinfo; // File info structure
@@ -184,7 +184,7 @@ class TDBSDR : public TDBDIR {
184184
struct _Sub_Dir *Next;
185185
struct _Sub_Dir *Prev;
186186
#if defined(__WIN__)
187-
int H; // Search handle
187+
intptr_t H; // Search handle
188188
#else // !__WIN__
189189
DIR *D;
190190
#endif // !__WIN__

0 commit comments

Comments
 (0)