Skip to content

Commit

Permalink
Merge pull request #17 from jefferis/fix/ubsan-maxNodeCount
Browse files Browse the repository at this point in the history
Fix UBSAN error calculating maxNodeCount
  • Loading branch information
simonlynen committed Sep 3, 2014
2 parents b794cee + 83ffa85 commit 5bc9540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nabo/kdtree_cpu.cpp
Expand Up @@ -242,7 +242,7 @@ namespace Nabo
return;
}

const uint64_t maxNodeCount((1 << (32-dimBitCount)) - 1);
const uint64_t maxNodeCount((0x1ULL << (32-dimBitCount)) - 1);
const uint64_t estimatedNodeCount(cloud.cols() / (bucketSize / 2));
if (estimatedNodeCount > maxNodeCount)
{
Expand Down

0 comments on commit 5bc9540

Please sign in to comment.