1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-11 16:10:27 +00:00

Remove end of string check that is now redudant.

The addition of some code to avoid valgrind warnings made this code
redundant.
This commit is contained in:
Calvin Rose 2022-09-05 20:13:15 -05:00
parent 14657a762c
commit ff26e3a8ba

View File

@ -214,7 +214,7 @@ tail:
if (text >= s->text_end) return NULL;
uint32_t word = rule[1 + (text[0] >> 5)];
uint32_t mask = (uint32_t)1 << (text[0] & 0x1F);
return (text < s->text_end && (word & mask))
return (word & mask)
? text + 1
: NULL;
}