aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'map.c')
-rw-r--r--map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/map.c b/map.c
index c46c7db..a433dc0 100644
--- a/map.c
+++ b/map.c
@@ -142,7 +142,7 @@ Map rbt_maze_map(size_t width, size_t height, unsigned int seed) {
visited_clear(visited, width, height);
PositionStack ps = ps_new();
- if (ps_push(&ps, beginning_cell) == -1) error("Is the STACK_SIZE zero?");
+ ps_push(&ps, beginning_cell);
visited[beginning_cell.y][beginning_cell.x] = 1;
Position na[4];
@@ -154,7 +154,7 @@ Map rbt_maze_map(size_t width, size_t height, unsigned int seed) {
if (nc > 0) {
Position next = na[rand() % nc];
Position prev = ps_peek(ps);
- if (ps_push(&ps, next) == -1) error("Stack overflow in rbt_maze_map(). Recompile with bigger STACK_SIZE or decrease the map size\n");
+ ps_push(&ps, next);
visited[next.y][next.x] = 1;
map[(next.y * 2 + prev.y * 2) / 2][(next.x * 2 + prev.x * 2) / 2] = EMPTY;
} else {