Make vectorscan accept \0 starting pattern (#312)

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:
ypicchi-arm
2024-08-22 08:32:53 +01:00
committed by GitHub
parent 2a4b9d1c78
commit d05f95d65f

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