From ded1566f530602cb255028b79633e135fe658f3b Mon Sep 17 00:00:00 2001 From: k Date: Tue, 21 Oct 2025 19:49:22 -0400 Subject: [PATCH] fixed fenGame loading backwords --- src/main.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.zig b/src/main.zig index f6253df..1cad363 100644 --- a/src/main.zig +++ b/src/main.zig @@ -60,7 +60,7 @@ fn uciPos(str: []const u8, alloc: std.mem.Allocator) *types.game { } fn fenGame(str: []const u8, alloc: std.mem.Allocator) *types.game { - var pos: u8 = 0; + var pos: u8 = 63; var space: u8 = 0; var g = alloc.create(types.game) catch unreachable; g.* = std.mem.zeroes(types.game); @@ -84,7 +84,7 @@ fn fenGame(str: []const u8, alloc: std.mem.Allocator) *types.game { const set: *u64 = mov.charToSet(g, chr); const bit: u64 = @as(u64, 1) << @truncate(pos); set.* |= bit; - pos += 1; + pos -= 1; } return g; }