From 5019edfa5a8a376aec774d025a774f99c0665fc0 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Sat, 8 Jul 2023 20:35:48 +0000 Subject: [PATCH] fix: constants override array indices --- src/HuffConfig.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/HuffConfig.sol b/src/HuffConfig.sol index 7b1ae25..a6f8b09 100644 --- a/src/HuffConfig.sol +++ b/src/HuffConfig.sol @@ -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); } }