git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit1e4979b6036020124b86baebe3b3886d7b187a9d
parent689f2e04ba
authorIsaac Freund <[email protected]>
date2021-02-02 18:16
river-options: fix setting null string options

 river/Option.zig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/river/Option.zig b/river/Option.zig
index db9a731..130f01a 100644
--- a/river/Option.zig
+++ b/river/Option.zig
@@ -89,7 +89,7 @@ pub fn set(self: *Self, value: Value) !void {
         };
     } else if (self.value == .string and
         // TODO: std.mem needs a good way to compare optional sentinel pointers
-        ((self.value.string == null and value.string == null) or
+        (((self.value.string == null) != (value.string == null)) or
         (self.value.string != null and value.string != null and
         std.cstr.cmp(self.value.string.?, value.string.?) != 0)))
     {