Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
fix: constants override array indices
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Jul 8, 2023
1 parent f027ce6 commit 5019edf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/HuffConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,15 @@ contract HuffConfig {
vm.ffi(append_cmds);

/// Create a list of strings with the commands necessary to compile Huff contracts
string[] memory cmds = new string[](3);
string[] memory cmds = new string[](5);
if (const_overrides.length > 0) {
cmds = new string[](4 + const_overrides.length);
cmds[3] = "-c";
cmds = new string[](6 + const_overrides.length);
cmds[5] = "-c";

Constant memory cur_const;
for (uint256 i; i < const_overrides.length; i++) {
cur_const = const_overrides[i];
cmds[4 + i] = string.concat(cur_const.key, "=", cur_const.value);
cmds[6 + i] = string.concat(cur_const.key, "=", cur_const.value);
}
}

Expand Down

0 comments on commit 5019edf

Please # to comment.