mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-03-28 21:34:52 +00:00
Merge pull request 'fix zig build error when '.progress.txt' contains newline' (#368) from pebose/exercises:fix-zig-build-error into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/368
This commit is contained in:
commit
a83a42528e
|
|
@ -278,7 +278,8 @@ pub fn build(b: *Build) !void {
|
||||||
return error.UnexpectedEOF;
|
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| {
|
} else |err| {
|
||||||
switch (err) {
|
switch (err) {
|
||||||
std.Io.File.OpenError.FileNotFound => {
|
std.Io.File.OpenError.FileNotFound => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user