I see what you fixed, and it looks correct, but the entire operation seems awfully inefficient. The entire point of this loop is to find the first bit that does not match in `p1[i]` and `p2[i]`. In that case, a simple:
```D
import core.bitop
immutable index = bsf(p1[i] ^ p2[i]);
```
Will just *tell* you which bit it is.

After that, instead of forking, you can:
```D
bool isLhs = p1[i] & cast(size_t)(1 << index);
return (isLhs << 1) - 1;
```
This returns `1`/'-1' from a bool.

Your code corrected the existing code, so it's fine as is anyways, but I though if you wanted to have fun... The code might have to be adapted someone though, so don't straight up copy paste ;)