fix(Parser): prevent index out of bounds error in skipUntilST
This commit is contained in:
parent
b82f4e14b4
commit
72d96638a4
1 changed files with 6 additions and 0 deletions
|
@ -212,6 +212,12 @@ inline fn skipUntilST(input: []const u8) Result {
|
||||||
.event = null,
|
.event = null,
|
||||||
.n = 0,
|
.n = 0,
|
||||||
};
|
};
|
||||||
|
if (input.len < end + 1 + 1) {
|
||||||
|
return .{
|
||||||
|
.event = null,
|
||||||
|
.n = 0,
|
||||||
|
};
|
||||||
|
}
|
||||||
const sequence = input[0 .. end + 1 + 1];
|
const sequence = input[0 .. end + 1 + 1];
|
||||||
return .{
|
return .{
|
||||||
.event = null,
|
.event = null,
|
||||||
|
|
Loading…
Reference in a new issue