aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2021-02-02 18:16:36 +0100
committerIsaac Freund <ifreund@ifreund.xyz>2021-02-02 18:16:36 +0100
commit1834bd4bd033bee4373cf805f7790ad356e91083 (patch)
treeb936933099bfb8b57343905e1380dcc0af0c412a
parent7029a5cd3e90ed5c23e8e5039745f92caeca4a99 (diff)
downloadriver-1834bd4bd033bee4373cf805f7790ad356e91083.tar.gz
river-1834bd4bd033bee4373cf805f7790ad356e91083.tar.xz
river-options: fix setting null string options
-rw-r--r--river/Option.zig2
1 files changed, 1 insertions, 1 deletions
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)))
{