From 4bedd33c593ab0cb750e17c42750048904fdf7fb Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 7 May 2024 16:58:17 +0900 Subject: Refactor the code to remove global variables --- src/ansi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ansi.go') diff --git a/src/ansi.go b/src/ansi.go index dbe4fd66..5f7c8be4 100644 --- a/src/ansi.go +++ b/src/ansi.go @@ -312,7 +312,7 @@ func parseAnsiCode(s string, delimiter byte) (int, byte, string) { // Inlined version of strconv.Atoi() that only handles positive // integers and does not allocate on error. code := 0 - for _, ch := range sbytes(s) { + for _, ch := range stringBytes(s) { ch -= '0' if ch > 9 { return -1, delimiter, remaining -- cgit v1.2.3