Commit 3578bb32 authored by astaxie's avatar astaxie

fix bug substr

parent 40c7b47c
......@@ -32,7 +32,7 @@ func Substr(s string, start, length int) string {
}
var end int
if (start + length) > (len(bt) - 1) {
end = len(bt) - 1
end = len(bt)
} else {
end = start + length
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment