fix: resolve use-afer-free in backup.zig

This worked fine on stage1, and works fine in debug in stage3.
However, stage3 ReleaseSafe would panic due to what I assume must
have been an undefined behaviour optimization.

While I'm happy that I was quickly made aware of the issue thanks to
the safety checks in ReleaseSafe I do wish that this issue showed itself
in Debug, since I *am* using the GPA
This commit is contained in:
2022-08-26 13:04:09 -05:00
parent 2ab8769b7a
commit e5b7441740
3 changed files with 12 additions and 13 deletions

View File

@@ -11,7 +11,6 @@ const pitch = @import("core/ppu.zig").framebuf_pitch;
const scale = @import("core/emu.zig").win_scale;
const emu = @import("core/emu.zig");
const asString = @import("core/util.zig").asString;
const log = std.log.scoped(.GUI);
const default_title: []const u8 = "ZBA";