diff options
| author | Paul Ebose <pebose@proton.me> | 2026-02-27 04:12:46 +0100 |
|---|---|---|
| committer | Paul Ebose <pebose@proton.me> | 2026-02-27 04:12:46 +0100 |
| commit | 178fd9cef35b5356b9eeb75dcf45d72b1136352f (patch) | |
| tree | 604ceaef052dc0d6584ee8b609916fa70c061ee3 | |
| parent | 3ecaa34271da0c0c41926ff604f9419e0b492bb3 (diff) | |
fix `zig build` error when '.progress.txt' contains newline
| -rw-r--r-- | build.zig | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -278,7 +278,8 @@ pub fn build(b: *Build) !void { return error.UnexpectedEOF; } - starting_exercise = try std.fmt.parseInt(u32, contents, 10); + const trimmed_contents = std.mem.trim(u8, contents, "\r\n"); + starting_exercise = try std.fmt.parseInt(u32, trimmed_contents, 10); } else |err| { switch (err) { std.Io.File.OpenError.FileNotFound => { |
