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

Panic on overflowing integer #12

Closed
5225225 opened this issue Oct 23, 2021 · 1 comment · Fixed by #14
Closed

Panic on overflowing integer #12

5225225 opened this issue Oct 23, 2021 · 1 comment · Fixed by #14
Labels
bug Something isn't working

Comments

@5225225
Copy link

5225225 commented Oct 23, 2021

Reproduction code

fn main() {
    use sqlformat::*;

    format("?62666666121266666612", &QueryParams::None, FormatOptions::default());
}

Where it fails:

let index = token[1..].parse::<usize>().unwrap();

@shssoichiro
Copy link
Owner

I'm trying to investigate if this is something that's even supported by the SQL spec... Either way, it shouldn't be panicking, it should either work or return a proper error.

@shssoichiro shssoichiro added the bug Something isn't working label Oct 24, 2021
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

Successfully merging a pull request may close this issue.

2 participants