Skip to content

Commit f80a850

Browse files
committed
fix(drawPattern): add invalid pattern behaviour
1 parent c608512 commit f80a850

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/utilities.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ void drawPattern(TGame* pGame, char* pattern) {
2929
} else if (strcmpi(pattern, "toad") == 0) {
3030
newToadPattern(&SPattern);
3131
pGame->cellsAlive = 6;
32-
};
32+
} else {
33+
return;
34+
}
3335

3436
pGame->cellsDead = (pGame->cols * pGame->rows) - pGame->cellsAlive;
3537
pGame->generation = 0;

0 commit comments

Comments
 (0)