From 8f16679be418e947ed2f74f1a5cdcd611b205525 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 15 Dec 2021 23:52:23 +0800 Subject: [PATCH] fix search bug --- source/libs/index/src/index_fst.c | 2 +- source/libs/index/src/index_fst_automation.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/libs/index/src/index_fst.c b/source/libs/index/src/index_fst.c index 54058489c2..e40195e6e6 100644 --- a/source/libs/index/src/index_fst.c +++ b/source/libs/index/src/index_fst.c @@ -1180,7 +1180,7 @@ bool fstBoundWithDataIsEmpty(FstBoundWithData *bound) { bool fstBoundWithDataIsIncluded(FstBoundWithData *bound) { - return bound->type == Included ? true : false; + return bound->type == Excluded? false : true; } void fstBoundDestroy(FstBoundWithData *bound) { diff --git a/source/libs/index/src/index_fst_automation.c b/source/libs/index/src/index_fst_automation.c index d905147654..803c95d0d8 100644 --- a/source/libs/index/src/index_fst_automation.c +++ b/source/libs/index/src/index_fst_automation.c @@ -145,7 +145,8 @@ AutomationCtx* automCtxCreate(void *data,AutomationType atype) { StartWithStateValue *sv = NULL; if (atype == AUTOMATION_PREFIX) { - sv = startWithStateValueCreate(Running, FST_INT, 0); + int val = 0; + sv = startWithStateValueCreate(Running, FST_INT, &val); ctx->stdata = (void *)sv; } else if (atype == AUTMMATION_MATCH) { -- GitLab