Skip to content

Commit 2bc2727

Browse files
more permissive registry nomenclature
Signed-off-by: General Kroll <generalkroll0@gmail.com>
1 parent 3d195b1 commit 2bc2727

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

go/vt/sqlparser/token.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,10 @@ func (tkn *Tokenizer) consumeNext(buffer *bytes2.Buffer) {
994994
}
995995

996996
func (tkn *Tokenizer) peek() string {
997-
bufStr := string(tkn.buf[tkn.bufPos:])
997+
if tkn.bufPos < 2 {
998+
return ""
999+
}
1000+
bufStr := string(tkn.buf[tkn.bufPos-2:])
9981001
if strings.Contains(bufStr, ";") {
9991002
return strings.Split(bufStr, ";")[0]
10001003
}

0 commit comments

Comments
 (0)