Skip to content

Commit

Permalink
Merge pull request #35 from xiaoxinmiao/master
Browse files Browse the repository at this point in the history
fix bug:slice bounds out of range
  • Loading branch information
wxbool authored Jun 11, 2021
2 parents 9e3e977 + 16253e3 commit 6b68392
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/aliyun/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,9 @@ func SubString(str string , begin int ,length int) (substr string) {
if begin >= lth {
begin = lth
}
if length < 0 {
length = 0
}
end := begin + length
if end > lth {
end = lth
Expand Down

0 comments on commit 6b68392

Please sign in to comment.