From 0a78587d8e41fa4b8c7ad8d48608368a5bc3889b Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Sun, 18 Sep 2022 07:43:33 -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 f635ae6..5af4105 100644 --- a/src/core/ppu.zig +++ b/src/core/ppu.zig @@ -269,7 +269,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),