diff --git a/src/bus/backup.zig b/src/bus/backup.zig index 0ba3987..ce639b3 100644 --- a/src/bus/backup.zig +++ b/src/bus/backup.zig @@ -102,11 +102,11 @@ pub const Backup = struct { const file_path = try self.getSaveFilePath(path); defer self.alloc.free(file_path); - const file = try std.fs.createFileAbsolute(file_path, .{}); - defer file.close(); - switch (self.kind) { .Sram => { + const file = try std.fs.createFileAbsolute(file_path, .{}); + defer file.close(); + try file.writeAll(self.buf); log.info("Dumped SRAM to {s}", .{file_path}); },