chiark / gitweb /
rect: Fix compiler errors about uninitialized use of variables
[sgt-puzzles.git] / rect.c
diff --git a/rect.c b/rect.c
index 55667c02a8372dd05ba30992c2643e0e247168f3..fa3a7869703e7cd7a94974ecb035a114313860cd 100644 (file)
--- a/rect.c
+++ b/rect.c
@@ -1317,7 +1317,8 @@ static char *new_game_desc(const game_params *params_in, random_state *rs,
                     if (ndirs > 0) {
                         int which, dir;
                         struct rect r1, r2;
-
+                        memset(&r1, 0, sizeof(struct rect));
+                        memset(&r2, 0, sizeof(struct rect));
                         which = random_upto(rs, ndirs);
                         dir = dirs[which];