Skip to content

Commit e9d12d1

Browse files
authored
Merge pull request sarbian#171 from al2me6/fix-index-checking
Fix off-by-one string indexing in constraint checking
2 parents 3894ce1 + c60e3c5 commit e9d12d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ModuleManager/MMPatchLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,7 @@ public static bool CheckConstraints(ConfigNode node, string constraints)
15481548
string remainingConstraints = "";
15491549
if (constraints.Contains(":HAS[", out int hasStart))
15501550
{
1551-
hasStart += 4;
1551+
hasStart += 5;
15521552
remainingConstraints = constraints.Substring(hasStart, constraintList[0].LastIndexOf(']') - hasStart);
15531553
constraints = constraints.Substring(0, hasStart - 5);
15541554
}

0 commit comments

Comments
 (0)