diff --git a/app/aliyun/tool.go b/app/aliyun/tool.go index 1690fbd..27a99e9 100644 --- a/app/aliyun/tool.go +++ b/app/aliyun/tool.go @@ -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