diff --git a/src/graphics.zig b/src/graphics.zig index 17fe28c4..dd818a3a 100644 --- a/src/graphics.zig +++ b/src/graphics.zig @@ -741,7 +741,7 @@ pub const TextBuffer = struct { // MARK: TextBuffer var unicodeIterator = std.unicode.Utf8Iterator{.bytes = text, .i = 0}; var count: usize = 0; var curChar = unicodeIterator.nextCodepoint() orelse return count; - while(true) switch(curChar) { + outer: while(true) switch(curChar) { '*' => { curChar = unicodeIterator.nextCodepoint() orelse break; }, @@ -767,7 +767,7 @@ pub const TextBuffer = struct { // MARK: TextBuffer count += 1; }, '#' => { - for(0..7) |_| curChar = unicodeIterator.nextCodepoint() orelse break; + for(0..7) |_| curChar = unicodeIterator.nextCodepoint() orelse break :outer; }, 'ยง' => { curChar = unicodeIterator.nextCodepoint() orelse break;