Skip to content
This repository was archived by the owner on Mar 12, 2022. It is now read-only.

Commit 88a03a2

Browse files
committed
try to fix bug
1 parent 4bdbd43 commit 88a03a2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

hv/hv.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ func (r *Render) Render(name string, data []byte) []byte {
147147
}
148148
}
149149

150+
// FIXME: index out of range
151+
if len(code) <= pos {
152+
break CutWords
153+
}
150154
if !isString {
151155
switch {
152156
case curChar == '/' && (code[pos+1] == '/' || code[pos+1] == '*'):

0 commit comments

Comments
 (0)