From 976a87e888321611eabcd8d0d8fefd1438e8d01b Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:34:09 -0300 Subject: [PATCH] chore: dont allocate not-small ?Sprite array on stack use memset like most other allocations in this emu --- src/core/ppu.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ppu.zig b/src/core/ppu.zig index 10a7253..256cb69 100644 --- a/src/core/ppu.zig +++ b/src/core/ppu.zig @@ -51,7 +51,7 @@ pub const Ppu = struct { sched.push(.Draw, 240 * 4); const sprites = try allocator.create([128]?Sprite); - sprites.* = [_]?Sprite{null} ** 128; + std.mem.set(?Sprite, sprites, null); return Self{ .vram = try Vram.init(allocator),