Skip to content

Commit

Permalink
Fix bug where too many arguments would be passed to printf
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenthuberdeau committed Sep 2, 2024
1 parent ff7652f commit 63432fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1605,6 +1605,7 @@ void handle_printf_call(char* format_str, ast params) {
format_start = format_str + 1; // skip the 's'
params = get_child(params, 1); // skip the string parameter
params_start = params;
params_count = 0;
} else if (*format_str != '%') { // Do nothing for %%
fatal_error("Unsupported format specifier");
}
Expand Down

0 comments on commit 63432fc

Please sign in to comment.