From: Konstantinos Margaritis Date: Fri, 23 Jul 2021 08:42:13 +0000 (+0300) Subject: fix lastMatch<64> X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fe06faffed1af532e0069160400b79bd725f749;p=thirdparty%2Fvectorscan.git fix lastMatch<64> --- diff --git a/src/util/match.hpp b/src/util/match.hpp index ba72e2e9..b321f757 100644 --- a/src/util/match.hpp +++ b/src/util/match.hpp @@ -120,7 +120,7 @@ const u8 *lastMatch<64>(const u8 *buf, typename SuperVector<64>::movemask_type z u32 pos = clz64(~z); DEBUG_PRINTF("match @ pos %u\n", pos); assert(pos < 64); - return buf + pos; + return buf + (63 - pos); } else { return NULL; // no match }