Skip to content

Commit

Permalink
fix: SemanticVersion deserialization in statefile
Browse files Browse the repository at this point in the history
  • Loading branch information
sdnts committed Apr 22, 2024
1 parent e243ab2 commit 676f9b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/state.zig
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ pub fn load(a: std.mem.Allocator, config: Config) !Self {
if (n == 0) break;
if (n < 26) return error.CorruptStatefile;

try versions.append(a, Versions{ .zig = zig.*[0..25], .zls = zls.*[0..25] });
try versions.append(a, Versions{
.zig = std.mem.trim(u8, zig.*[0..25], "\x00"),
.zls = std.mem.trim(u8, zls.*[0..25], "\x00"),
});
}

const state = Self{
Expand Down

0 comments on commit 676f9b9

Please sign in to comment.