From 1004bcd9f704bcc24b8c8aa8bb714683233a05eb Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 22 Apr 2026 04:48:54 +0300 Subject: [PATCH] scanner: fix v -g self --- vlib/v/scanner/scanner.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlib/v/scanner/scanner.v b/vlib/v/scanner/scanner.v index f0a29ccdc..4b964fc74 100644 --- a/vlib/v/scanner/scanner.v +++ b/vlib/v/scanner/scanner.v @@ -1438,7 +1438,8 @@ fn (mut s Scanner) decode_o_escapes(sinput string, start int, escapes_pos []int) return '' } // notice this function doesn't do any decoding... it just replaces '\141' with the byte 0o141 - ss << [u8(strconv.parse_uint(sinput[idx + 1..end_idx], 8, 8) or { 0 })].bytestr() + octal_byte := u8(strconv.parse_uint(sinput[idx + 1..end_idx], 8, 8) or { 0 }) + ss << [octal_byte].bytestr() if i + 1 < escapes_pos.len { ss << sinput[end_idx..escapes_pos[i + 1] - start] } else { -- 2.39.5