Skip to content

Commit 0d2c758

Browse files
committed
Prevent Potential Subtraction Overflow
1 parent 1718ddd commit 0d2c758

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/emmylua_code_analysis/src/semantic/infer/infer_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ fn infer_table_type_by_calleee(
251251
call_arg_number += 1;
252252
}
253253
(true, false) => {
254-
call_arg_number -= 1;
254+
call_arg_number = call_arg_number.saturating_sub(1);
255255
}
256256
}
257257
let typ = param_types

0 commit comments

Comments
 (0)