Skip to content
New issue

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

[BUG] Potencial substraction overflow #13

Open
NEUZhangy opened this issue Feb 7, 2022 · 0 comments
Open

[BUG] Potencial substraction overflow #13

NEUZhangy opened this issue Feb 7, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@NEUZhangy
Copy link

Rust version: rustc 1.58.1 (db9d1b20b 2022-01-20)

Test case

add test for src/parser.rs::parse_number
#[test]
fn test_parse() {
let mut integer = vec![0u8];
let mut fraction = vec![0u8];
let data = 1;
let mut rdr = parse_number(integer.iter(), fraction.iter(), data);
}
error infor:
thread 'parse::test_parse' panicked at 'attempt to subtract with overflow', src/parse.rs:44:21
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

@NEUZhangy NEUZhangy added the bug Something isn't working label Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants