mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 03:06:55 -04:00
parent
bf7d20f11e
commit
27ef22e21a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user