fix: fix some edge case errors
This commit is contained in:
parent
4d56633c43
commit
c5a6d82aa8
4 changed files with 17 additions and 7 deletions
|
|
@ -144,7 +144,7 @@ pub fn parse<'a>(src: &'a str) -> (Object<'a>, usize, Option<(Object<'a>, usize)
|
|||
if let Some(off) = bs
|
||||
.find(&bytes[pos + 1..])
|
||||
.map(|i| i + pos + 1)
|
||||
.filter(|&i| i < src.len() - 2)
|
||||
.filter(|&i| i < src.len() - 3)
|
||||
{
|
||||
pos = off;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue