From 8cdf25536841a698ad6229f73cdf8ef5ccc1e5fa Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Thu, 4 Nov 2021 22:44:25 -0400 Subject: [EXEC] Flush out a couple of funcs + I no longer understand my own code. --- src/tparse/tokenize.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tparse/tokenize.go') diff --git a/src/tparse/tokenize.go b/src/tparse/tokenize.go index 2231907..56e866f 100644 --- a/src/tparse/tokenize.go +++ b/src/tparse/tokenize.go @@ -344,10 +344,10 @@ func TokenizeFile(path string) []Token { // StringAsRunes returns a string as a rune slice func StringAsRunes(s string) []rune { out := []rune{} + var r rune for i, j := 0, 0; i < len(s); i += j { - r, w := utf8.DecodeRuneInString(s[i:]) + r, j = utf8.DecodeRuneInString(s[i:]) out = append(out, r) - j = w } return out } -- cgit v1.2.3