Fix bug(s) in pattern compilation that added the '[' pr ']' chars.
This commit is contained in:
parent
0b6d73ebdf
commit
5be88a2856
|
@ -203,6 +203,10 @@ liblex_result _pattern_build_or(pattern_chain** into, int* ids, int pattern_id,
|
|||
result = _pattern_chain_create(into, NULL, tail_node);
|
||||
}
|
||||
|
||||
if(result == LIBLEX_SUCCESS){
|
||||
(*index)++;
|
||||
}
|
||||
|
||||
while (string[*index] && string[*index] != ']' && result == LIBLEX_SUCCESS) {
|
||||
char from = '\0';
|
||||
char to = '\0';
|
||||
|
@ -248,6 +252,8 @@ liblex_result _pattern_build_or(pattern_chain** into, int* ids, int pattern_id,
|
|||
free(tail_node);
|
||||
}
|
||||
free(*into);
|
||||
} else {
|
||||
(*index)++;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue
Block a user