Skip to content

Commit 2ebdd35

Browse files
fda0igcbot
authored andcommitted
Adjust raytracing macro QWBITMASK
Change `QWBITMASK` to handle values equal or greater than 64.
1 parent f560496 commit 2ebdd35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

3d/common/iStdLib/utility.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ MACRO: QWBITMASK
6161
PURPOSE: Creates a mask of n bits
6262
\*****************************************************************************/
6363
#ifndef QWBITMASK
64-
#define QWBITMASK( n ) ( ~( (0xffffffffffffffffull) << (n) ) )
64+
#define QWBITMASK( n ) ((n) >= 64 ? 0xffffffffffffffffull : (~((0xffffffffffffffffull) << (n))))
6565
#endif
6666

6767
#ifndef QWBITMASK_RANGE

0 commit comments

Comments
 (0)