Quellcode durchsuchen

bug(function): fix a compile warning

ngjaying vor 5 Jahren
Ursprung
Commit
151ae8bbb2
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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
 		}