fix shift causing undefined behaviour on SDR_PermuteByRotation
@@ -98,7 +98,7 @@ SDR SDR_PermuteByRotation(SDR *sdr, bool forward)
{
for(int i=0; i<SDR_NUM_BLOCKS; i++)
{
- SDR_BLOCK_TYPE left_bit = c.blocks[i] & (1 << shiftToLeftmost);
+ SDR_BLOCK_TYPE left_bit = c.blocks[i] & ((SDR_BLOCK_TYPE)1 << shiftToLeftmost);
c.blocks[i] = (c.blocks[i]<<1) | (left_bit > 0);
}
}
