mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
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:
parent
aa4bc24439
commit
e4c49f2aa2
@ -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.");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user