From 4b90fcb72a8a35681ed69314b279c02d8ef8bec6 Mon Sep 17 00:00:00 2001 From: Yoan Picchi Date: Thu, 1 Aug 2024 17:42:51 +0000 Subject: [PATCH] Make vectorscan accept \0 starting pattern Vectorscan used to reject such pattern because they were being compared to "" and found to be an empty string. We now check the pattern length instead. Signed-off-by: Yoan Picchi --- src/compiler/compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/compiler.cpp b/src/compiler/compiler.cpp index aa8de4ba..ec9295c9 100644 --- a/src/compiler/compiler.cpp +++ b/src/compiler/compiler.cpp @@ -417,7 +417,7 @@ void addLitExpression(NG &ng, unsigned index, const char *expression, "HS_FLAG_SOM_LEFTMOST are supported in literal API."); } - if (!strcmp(expression, "")) { + if (expLength == 0) { throw CompileError("Pure literal API doesn't support empty string."); }