From 06ee31980ec601ab3c56449c7f42a2df11d68652 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),