Skip to content

Commit 2bc6460

Browse files
authored
Merge pull request #22 from BTNC/master
fix for windows x64
2 parents 68d579a + 115c613 commit 2bc6460

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paths.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ lua_dir(lua_State *L)
602602

603603
SB sb;
604604
struct _finddata_t info;
605-
long hfind;
605+
intptr_t hfind;
606606
/* special cases */
607607
lua_createtable(L, 0, 0);
608608
if ((s[0]=='/' || s[0]=='\\') &&
@@ -611,7 +611,7 @@ lua_dir(lua_State *L)
611611
int drive;
612612
hfind = GetLogicalDrives();
613613
for (drive='A'; drive<='Z'; drive++)
614-
if (hfind & (1<<(drive-'A'))) {
614+
if (hfind & ((intptr_t)1<<(drive-'A'))) {
615615
lua_pushfstring(L, "%c:/", drive);
616616
lua_rawseti(L, -2, ++k);
617617
}

0 commit comments

Comments
 (0)