fix lastMatch<64>

This commit is contained in:
Konstantinos Margaritis 2021-07-23 11:42:13 +03:00
parent ebb1b84ae3
commit cabd13d18a

View File

@ -120,7 +120,7 @@ const u8 *lastMatch<64>(const u8 *buf, typename SuperVector<64>::movemask_type z
u32 pos = clz64(~z); u32 pos = clz64(~z);
DEBUG_PRINTF("match @ pos %u\n", pos); DEBUG_PRINTF("match @ pos %u\n", pos);
assert(pos < 64); assert(pos < 64);
return buf + pos; return buf + (63 - pos);
} else { } else {
return NULL; // no match return NULL; // no match
} }