Prechádzať zdrojové kódy

bug(function): fix a compile warning

ngjaying 5 rokov pred
rodič
commit
151ae8bbb2
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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
 		}