- index = ctx->probeindices[p];
- curbit = (sample & (((uint64_t) 1) << index)) >> index;
- prevbit = (ctx->prevsample & (((uint64_t) 1) << index)) >> index;
+ index = g_array_index(ctx->probeindices, int, p);
+ curbit = (sample[p / 8] & (((uint8_t) 1) << index)) >> index;
+ prevbit = (ctx->prevsample[p / 8] & (((uint64_t) 1) << index)) >> index;