|
|
|
|
|
by unwind
3 hours ago
|
|
Meta: a space is missing in the title. Since this is one of the bugs, I always recommemd writing game->boardPieces = swAlloc(sizeof(ThingHandle*) * row * column);
Like this instead: game->boardPieces = swAlloc(sizeof *game->boardPieces * row * column);
It's not 100% better, but it cuts out a few tokens which helps readability and moves the significant asterix further left where I think it's easier to spot. |
|
But ACSHUALLY, how you write allocation is like this
The kernel people seem to finally have figured out this one in 2026.