Skip to content

Commit

Permalink
Fix bug in 'findFirstSetBit' Win32.
Browse files Browse the repository at this point in the history
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 9bee7af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmorton/include/morton_common.h
Expand Up @@ -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;
Expand Down

0 comments on commit 9bee7af

Please sign in to comment.