chore: dont allocate not-small ?Sprite array on stack

use memset like most other allocations in this emu
This commit is contained in:
Rekai Nyangadzayi Musuka 2022-09-18 07:43:33 -03:00
parent 764ceff7a8
commit f9ba5f9b3a
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,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),