浏览代码

bug(function): fix a compile warning

ngjaying 5 年之前
父节点
当前提交
151ae8bbb2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      xsql/funcs_str.go

+ 1 - 1
xsql/funcs_str.go

@@ -107,7 +107,7 @@ func strCall(name string, args []interface{}) (interface{}, bool) {
 		ss := strings.Split(arg0, arg1)
 		v, _ := common.ToInt(args[2])
 		if v > (len(ss) - 1) {
-			return fmt.Errorf("%d out of index array (size = %d)", v, ss), false
+			return fmt.Errorf("%d out of index array (size = %d)", v, len(ss)), false
 		} else {
 			return ss[v], true
 		}