From b6d981254bfb724d9504c154a62632b607a32be6 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Fri, 26 Jun 2020 01:13:00 +0200 Subject: [PATCH] seat: pass a null terminated string --- river/Seat.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/river/Seat.zig b/river/Seat.zig index 9991963..634bfcf 100644 --- a/river/Seat.zig +++ b/river/Seat.zig @@ -71,11 +71,11 @@ status_trackers: std.SinglyLinkedList(SeatStatus), listen_request_set_selection: c.wl_listener, -pub fn init(self: *Self, input_manager: *InputManager, name: []const u8) !void { +pub fn init(self: *Self, input_manager: *InputManager, name: [*:0]const u8) !void { self.input_manager = input_manager; // This will be automatically destroyed when the display is destroyed - self.wlr_seat = c.wlr_seat_create(input_manager.server.wl_display, name.ptr) orelse return error.OutOfMemory; + self.wlr_seat = c.wlr_seat_create(input_manager.server.wl_display, name) orelse return error.OutOfMemory; self.wlr_seat.data = self; try self.cursor.init(self);