Skip to content

Commit a99d342

Browse files
committed
Fix casting to Boolean in driveValid()
1 parent 596fd41 commit a99d342

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/tvision/tdircoll.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <dos.h>
3535
#endif // __DOS_H
3636

37-
#if defined( _WIN32 ) && defined( __FLAT__ )
37+
#if defined( __FLAT__ )
3838
#include <tvision/compat/windows/windows.h>
3939
#endif
4040

@@ -66,7 +66,7 @@ I XCHG AX, CX // Put the return value into AX
6666
#else
6767
drive = toupper((uchar) drive);
6868
DWORD mask = 0x01 << (drive - 'A');
69-
return (Boolean) (GetLogicalDrives() & mask);
69+
return Boolean( (GetLogicalDrives() & mask) != 0 );
7070
#endif
7171
#else
7272
// Unless otherwise necessary, we will emulate there's only one disk:

0 commit comments

Comments
 (0)