Commit 56d8abab authored by Max Kobelt's avatar Max Kobelt
Browse files

Fix wrong size of Aliens array

parent 8d922152
......@@ -14,7 +14,7 @@ Aliens* spawnAliens() {
aliens->movingRight = true;
aliens->velocity = LASER_CANON_SPEED;
bool **instances = malloc(sizeof *instances);
bool **instances = malloc(sizeof *instances * ALIEN_COLS);
for (int j = 0; j < ALIEN_COLS; ++j) {
instances[j] = malloc(sizeof **instances * ALIEN_ROWS);
for (int i = 0; i < ALIEN_ROWS; ++i) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment