Skip to content

Commit b222a37

Browse files
committed
wasm: fix Label
1 parent 6448ebf commit b222a37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backends/wasm/backend.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,15 @@ pub const Label = struct {
263263

264264
pub fn setAlignment(_: *Label, _: f32) void {}
265265

266-
pub fn setText(self: *Label, text: [:0]const u8) void {
266+
pub fn setText(self: *Label, text: []const u8) void {
267267
js.setText(self.peer.element, text.ptr, text.len);
268268
if (self.temp_text) |slice| {
269269
lasting_allocator.free(slice);
270270
self.temp_text = null;
271271
}
272272
}
273273

274-
pub fn getText(self: *Label) [:0]const u8 {
274+
pub fn getText(self: *Label) []const u8 {
275275
if (self.temp_text) |text| {
276276
return text;
277277
} else {

0 commit comments

Comments
 (0)