3578bb32 by astaxie

fix bug substr

1 parent 40c7b47c
Showing 1 changed file with 1 additions and 1 deletions
...@@ -32,7 +32,7 @@ func Substr(s string, start, length int) string { ...@@ -32,7 +32,7 @@ func Substr(s string, start, length int) string {
32 } 32 }
33 var end int 33 var end int
34 if (start + length) > (len(bt) - 1) { 34 if (start + length) > (len(bt) - 1) {
35 end = len(bt) - 1 35 end = len(bt)
36 } else { 36 } else {
37 end = start + length 37 end = start + length
38 } 38 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!