MHN
Add a comment on Hacker News →
1 of 111 commentsUpdating…
  1. 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.