fd69f1aadd8c33ef336640d444999813350d1612
Substr panicked with a slice-bounds error when a negative length trimmed more runes than remained after pos, because stopIdx (strLn + length) could fall before pos. Clamp stopIdx to pos so an over-long negative trim returns an empty string, matching the existing pos >= strLn guard.
Description
My contributions to gookit/goutil: 4 commits, 1 merged PRs
49 KiB
0 Stars
1 Watchers
0 Forks
Languages
Go
100%