refactor: don't require zero termination any more for Plane.cell_load

This commit is contained in:
CJ van den Berg 2024-12-10 20:09:16 +01:00
parent b3bd6d19b5
commit ce0633b665
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -244,7 +244,7 @@ pub fn cell_init(self: Plane) Cell {
return .{ .cell = .{ .style = self.style } };
}
pub fn cell_load(self: *Plane, cell: *Cell, gcluster: [:0]const u8) !usize {
pub fn cell_load(self: *Plane, cell: *Cell, gcluster: []const u8) !usize {
var cols: c_int = 0;
const bytes = self.egc_length(gcluster, &cols, 0, 1);
cell.cell.char.grapheme = self.cache.put(gcluster[0..bytes]);