Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Commit 1e40961

Browse files
committed
Merge pull request #192 from MoleculeDotNet/dev
Fix array range exception during WriteConfig
2 parents 8d1e5cf + d41dd6b commit 1e40961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Framework/Tools/MFDeploy/Library/MFConfigHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ private void WriteConfig(string configName, byte[] data, bool staticSize, bool u
875875
newLastIndex++; // Force a 4 byte boundary
876876
}
877877

878-
byte[] temp = new byte[m_lastCfgIndex >= m_all_cfg_data.Length ? m_lastCfgIndex + data.Length : m_all_cfg_data.Length];
878+
byte[] temp = new byte[m_lastCfgIndex + data.Length >= m_all_cfg_data.Length ? m_lastCfgIndex + data.Length : m_all_cfg_data.Length];
879879

880880
Array.Copy(m_all_cfg_data, 0, temp, 0, m_all_cfg_data.Length);
881881
Array.Copy( data, 0, temp, m_lastCfgIndex, data.Length);

0 commit comments

Comments
 (0)