Skip to content

Commit

Permalink
Merge pull request #1427 from xanathar/pr/detect_lenght_overflow_fix
Browse files Browse the repository at this point in the history
Fixes an overflow bug that may occasionally panic if gir is built in debug
  • Loading branch information
sdroege committed Mar 5, 2023
2 parents 43b9242 + ebb4783 commit 0334ced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/analysis/function_parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ fn detect_length<'a>(
par: &library::Parameter,
parameters: &'a [library::Parameter],
) -> Option<&'a library::Parameter> {
if !is_length(par) {
if !is_length(par) || pos == 0 {
return None;
}

Expand Down

0 comments on commit 0334ced

Please sign in to comment.