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 <yoan.picchi@arm.com>
This commit is contained in:
Yoan Picchi 2024-08-01 17:42:51 +00:00
parent b312112e87
commit 4b90fcb72a

View File

@ -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.");
}