diff --git a/src/detect-distance.c b/src/detect-distance.c index 2e3e37ec54..6b5cfb045e 100644 --- a/src/detect-distance.c +++ b/src/detect-distance.c @@ -153,7 +153,7 @@ static int DetectDistanceSetup (DetectEngineCtx *de_ctx, Signature *s, &s->pmatch, &s->pmatch_tail, &s->dmatch, &s->dmatch_tail); pm = pm1; - } else if (pm2_ots->idx > dcem->idx) { + } else { /* within is against pm1, pm = pm1 */ pm = pm1; } diff --git a/src/detect-within.c b/src/detect-within.c index a4164cb3f8..ec6b7d6caa 100644 --- a/src/detect-within.c +++ b/src/detect-within.c @@ -156,7 +156,7 @@ static int DetectWithinSetup (DetectEngineCtx *de_ctx, Signature *s, char *withi &s->pmatch, &s->pmatch_tail, &s->dmatch, &s->dmatch_tail); pm = pm1; - } else if (pm2_ots->idx > dcem->idx) { + } else { /* within is against pm1, pm = pm1 */ pm = pm1; }