From 2f9d063190f99bbd6ccb0049d20e886f15c95908 Mon Sep 17 00:00:00 2001 From: "Xu, Chi" Date: Thu, 6 Apr 2017 04:20:17 +0800 Subject: [PATCH] rose: fix CHECK_MULTIPATH_LOOKAROUND match difference bug --- src/rose/program_runtime.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rose/program_runtime.h b/src/rose/program_runtime.h index 88c312d2..10a87c8b 100644 --- a/src/rose/program_runtime.h +++ b/src/rose/program_runtime.h @@ -1192,9 +1192,10 @@ int roseMultipathLookaround(const struct RoseEngine *t, return 0; } - u32 start_offset = 0; + s8 base_look_offset = *look; do { s64a offset = base_offset + *look; + u32 start_offset = (u32)(*look - base_look_offset); DEBUG_PRINTF("start_mask[%u] = %x\n", start_offset, start_mask[start_offset]); path = start_mask[start_offset]; @@ -1202,7 +1203,6 @@ int roseMultipathLookaround(const struct RoseEngine *t, break; } DEBUG_PRINTF("look=%d before history\n", *look); - start_offset++; look++; reach += MULTI_REACH_BITVECTOR_LEN; } while (look < look_end);