diff --git a/Makefile b/Makefile index de73b3abf..ed069801d 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ all: vset.so .c.xo: $(CC) -I. $(CFLAGS) $(SHOBJ_CFLAGS) -fPIC -c $< -o $@ -vset.xo: redismodule.h +vset.xo: redismodule.h expr.c vset.so: vset.xo hnsw.xo cJSON.xo $(CC) -o $@ $^ $(SHOBJ_LDFLAGS) $(LIBS) -lc diff --git a/expr.c b/expr.c index cc77ba94e..325edb900 100644 --- a/expr.c +++ b/expr.c @@ -715,6 +715,10 @@ exprtoken *exprJsonToToken(cJSON *js) { obj->str.start = obj->str.heapstr; obj->str.len = strlen(obj->str.heapstr); return obj; + } else if (cJSON_IsBool(js)) { + exprtoken *obj = exprNewToken(EXPR_TOKEN_NUM); + obj->num = cJSON_IsTrue(js); + return obj; } else if (cJSON_IsArray(js)) { // First, scan the array to ensure it only // contains strings and numbers. Otherwise the