Use ObjFW functions for memory management

FossilOrigin-Name: 71ebb79f8f6a5c2920c91b004bf274f9133e3ee04caddaf0f5ba01f98db27762
This commit is contained in:
Jonathan Schleifer 2025-03-08 03:26:23 +00:00
parent a28209edcf
commit 3d8735818d
10 changed files with 23 additions and 32 deletions

View file

@ -238,7 +238,8 @@ dodynlight(
block *
blockcopy(block &s)
{
block *b = (block *)alloc(sizeof(block) + s.xs * s.ys * sizeof(sqr));
block *b = (block *)OFAllocZeroedMemory(
1, sizeof(block) + s.xs * s.ys * sizeof(sqr));
*b = s;
sqr *q = (sqr *)(b + 1);
for (int x = s.x; x < s.xs + s.x; x++)