diff --git a/bot/bot/ConditionHolder.cs b/bot/bot/ConditionHolder.cs index 2d27e43..07d14e3 100644 --- a/bot/bot/ConditionHolder.cs +++ b/bot/bot/ConditionHolder.cs @@ -34,6 +34,7 @@ namespace bot { } else { } + str = condstring.Substring((pair[0] == 0) ? 0 : _G.indexOfNth(condstring, ';', pair[0] + 1) + 1, _G.indexOfNth(condstring, ';', pair[1] + 2) + 1); str = Int32.Parse(str.Substring(0, str.IndexOf(','))) - 1 + str.Substring(str.IndexOf(',')); diff --git a/bot/bot/_G.cs b/bot/bot/_G.cs index a382195..e184049 100644 --- a/bot/bot/_G.cs +++ b/bot/bot/_G.cs @@ -96,7 +96,8 @@ namespace bot { int fcount = 0; for(int i = 0; i < str.Length; i++) { if(str[i] == c) fcount++; - if(fcount == index) return i; + if(fcount == index) + return i; } return -1; }