Handle empty list of included ranges w/ non-null pointer
This commit is contained in:
parent
d5dc4bbcaa
commit
077cd4970c
1 changed files with 1 additions and 1 deletions
|
|
@ -296,7 +296,7 @@ static const TSRange DEFAULT_RANGES[] = {
|
|||
};
|
||||
|
||||
void ts_lexer_set_included_ranges(Lexer *self, const TSRange *ranges, uint32_t count) {
|
||||
if (!ranges) {
|
||||
if (count == 0 || !ranges) {
|
||||
ranges = DEFAULT_RANGES;
|
||||
count = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue