Skip to content

Commit

Permalink
Fix crash when using invalid amount of function macro parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Polák committed Oct 27, 2022
1 parent cfdbe06 commit 39a8679
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private void fillBufferIfEmpty() {

for (ForeignLeafType type : redefinition.redefinedTo) {
final int argumentIndex = arguments.indexOf(type.getValue());
if (argumentIndex >= 0) {
if (argumentIndex >= 0 && argumentIndex < actualArguments.size()) {
// Insert argument
Collections.addAll(result, actualArguments.get(argumentIndex));
} else {
Expand Down

0 comments on commit 39a8679

Please sign in to comment.