From 80d4b114f35e3966b1cce71b1414a84b917b6c67 Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Sun, 26 Apr 2026 18:37:33 +0200 Subject: [PATCH] Fix 32-bit issues on Ly's side Signed-off-by: AnErrupTion --- build.zig | 2 +- ly-core/src/interop.zig | 2 +- src/animations/Cascade.zig | 8 ++++---- src/animations/DurFile.zig | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.zig b/build.zig index ff5ce4a..2aeac26 100644 --- a/build.zig +++ b/build.zig @@ -450,7 +450,7 @@ fn patchFile(allocator: std.mem.Allocator, io: std.Io, source_file: []const u8, var buffer: [4096]u8 = undefined; var reader = file.reader(io, &buffer); - var text = try reader.interface.readAlloc(allocator, stat.size); + var text = try reader.interface.readAlloc(allocator, @intCast(stat.size)); var iterator = patch_map.iterator(); while (iterator.next()) |kv| { diff --git a/ly-core/src/interop.zig b/ly-core/src/interop.zig index c580a49..5b2b954 100644 --- a/ly-core/src/interop.zig +++ b/ly-core/src/interop.zig @@ -266,7 +266,7 @@ pub fn supportsUnicode() bool { } pub fn timeAsString(io: std.Io, buf: [:0]u8, format: [:0]const u8) []u8 { - const timer = std.Io.Timestamp.now(io, .real).toSeconds(); + const timer: isize = @intCast(std.Io.Timestamp.now(io, .real).toSeconds()); const tm_info = time.localtime(&timer); const len = time.strftime(buf, buf.len, format, tm_info); diff --git a/src/animations/Cascade.zig b/src/animations/Cascade.zig index c1e88f1..587cd37 100644 --- a/src/animations/Cascade.zig +++ b/src/animations/Cascade.zig @@ -11,14 +11,14 @@ const Cascade = @This(); io: std.Io, instance: ?Widget = null, buffer: *TerminalBuffer, -current_auth_fails: *usize, -max_auth_fails: usize, +current_auth_fails: *u64, +max_auth_fails: u64, pub fn init( io: std.Io, buffer: *TerminalBuffer, - current_auth_fails: *usize, - max_auth_fails: usize, + current_auth_fails: *u64, + max_auth_fails: u64, ) Cascade { return .{ .io = io, diff --git a/src/animations/DurFile.zig b/src/animations/DurFile.zig index 18844b8..c20c2d2 100644 --- a/src/animations/DurFile.zig +++ b/src/animations/DurFile.zig @@ -310,7 +310,7 @@ allocator: Allocator, io: std.Io, terminal_buffer: *TerminalBuffer, dur_movie: DurFormat, -frames: u64, +frames: usize, frame_size: UVec2, start_pos: IVec2, full_color: bool,