terminal/kitty-gfx: mistaken logic

This commit is contained in:
Mitchell Hashimoto
2024-02-12 19:35:02 -08:00
parent 6a3b676779
commit 6acf2b40af

View File

@ -76,8 +76,8 @@ pub const LoadingImage = struct {
return error.InvalidData;
};
if (comptime builtin.os != .windows) {
if (std.mem.indexOfScalar(u8, buf[0..size], 0) == null) {
if (comptime builtin.os.tag != .windows) {
if (std.mem.indexOfScalar(u8, buf[0..size], 0) != null) {
// std.os.realpath *asserts* that the path does not have
// internal nulls instead of erroring.
log.warn("failed to get absolute path: BadPathName", .{});