runes: fix ReadRune() to actually move the cursor
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
+2
-1
@@ -168,7 +168,8 @@ func (b *Reader) ReadRune() (rune, int, error) {
|
||||
|
||||
// decode rune
|
||||
r, l := utf8.DecodeRune(b.buf[b.cursor:])
|
||||
|
||||
// step over
|
||||
b.cursor += l
|
||||
// and remember for UnreadRune()
|
||||
b.lastRuneSize = l
|
||||
|
||||
|
||||
Reference in New Issue
Block a user