We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following Rust code:
let _ = rslint_parser::parse_text_lossy("var foo = (c>>10);", 0);
panics with:
'slice index starts at 8 but ends at 2', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/rslint_parser-0.3.1/src/lossy_tree_sink.rs:36:13
The panicking statement is:
fn consume_multiple_tokens(&mut self, amount: u8, kind: SyntaxKind) { // ... let len = TextSize::from( self.tokens[self.token_pos..amount as usize] // << HERE .iter() .map(|x| x.len) .sum::<usize>() as u32, ); // ... }
This slice range looks suspicious; changing it to self.token_pos..(self.token_pos + amount as usize) seems to fix the bug.
self.token_pos..(self.token_pos + amount as usize)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following Rust code:
panics with:
The panicking statement is:
This slice range looks suspicious; changing it to
self.token_pos..(self.token_pos + amount as usize)
seems to fix the bug.The text was updated successfully, but these errors were encountered: