Zig 0.16: fix toUtf8

This commit is contained in:
LN Liberda 2026-05-23 19:38:40 +02:00
parent 6ae03876bc
commit e3068d12ce

View file

@ -113,7 +113,7 @@ pub fn toUtf8(in: [:0]const u8) [:0]const u8 {
} else |_| {}
}
} else |_| {}
to_utf8_buf.writer(main.allocator).print("\\x{X:0>2}", .{in[i]}) catch unreachable;
to_utf8_buf.print(main.allocator, "\\x{X:0>2}", .{in[i]}) catch unreachable;
i += 1;
}
return util.arrayListBufZ(&to_utf8_buf, main.allocator);