Skip to content

Commit

Permalink
add limit to iterating rules
Browse files Browse the repository at this point in the history
added index limit to rule replacer to make valid rules
  • Loading branch information
JakeWnuk committed Nov 8, 2024
1 parent 938ff72 commit b3cc0e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/rule/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func CharToIteratingRule(str string, rule string, index int) string {
for i, r := range str {
if i+index < 10 {
result.WriteString(fmt.Sprintf("%s%d%c ", rule, i+index, r))
} else {
} else if i+index-10 < 26 {
result.WriteString(fmt.Sprintf("%s%c%c ", rule, 'A'+i+index-10, r))
}
}
Expand Down

0 comments on commit b3cc0e2

Please sign in to comment.