From f107302e9b2571ebc44d84b934fa9100a7719540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B9ng=20T=E1=BA=A1=20Quang?= Date: Fri, 7 May 2021 09:13:03 +0700 Subject: [PATCH] Fix: Make sure loc[1] exists --- named.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/named.go b/named.go index 58bedd5..728aa04 100644 --- a/named.go +++ b/named.go @@ -245,7 +245,7 @@ func findMatchingClosingBracketIndex(s string) int { func fixBound(bound string, loop int) string { loc := valuesReg.FindStringIndex(bound) // defensive guard when "VALUES (...)" not found - if len(loc) < 1 { + if len(loc) < 2 { return bound }