Skip to content

Commit f107302

Browse files
committed
Fix: Make sure loc[1] exists
1 parent 3ab43db commit f107302

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

named.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func findMatchingClosingBracketIndex(s string) int {
245245
func fixBound(bound string, loop int) string {
246246
loc := valuesReg.FindStringIndex(bound)
247247
// defensive guard when "VALUES (...)" not found
248-
if len(loc) < 1 {
248+
if len(loc) < 2 {
249249
return bound
250250
}
251251

0 commit comments

Comments
 (0)