Skip to content
Permalink
Browse files

Fix bug in 'findFirstSetBit' Win32.

Adds missing dereference when adding '32' to result of upper half of 64-bit input.
  • Loading branch information...
kevinhartman committed Sep 3, 2018
1 parent 9f6688d commit 9bee7af145f24b653b8b195ffc0f4147e0268e02
Showing with 1 addition and 1 deletion.
  1. +1 −1 libmorton/include/morton_common.h
@@ -19,7 +19,7 @@ namespace libmorton {
else {
*firstbit_location = 0;
if (_BitScanReverse(firstbit_location, (x >> 32))) { // check first part
firstbit_location += 32;
*firstbit_location += 32;
return true;
}
return _BitScanReverse(firstbit_location, (x & 0xFFFFFFFF)) != 0;

0 comments on commit 9bee7af

Please sign in to comment.
You can’t perform that action at this time.