summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <Colomar.6.4.3@GMail.com>2018-09-12 23:05:55 +0200
committerGitHub <noreply@github.com>2018-09-12 23:05:55 +0200
commit2ab2809a79c262852db3a0d3e107f568b1f9d752 (patch)
treecd65cb19d74ca5364adb3579730ad9f28d10b73e
parentb28ed3c7485ea4e4c4bb738c630723a64d5d8e15 (diff)
Fix bug
errno is set to 0 before calling the function that sets its value. Before that, on Windows, residual values of errno blocked loading a game.
-rw-r--r--modules/ctrl/src/start.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/ctrl/src/start.c b/modules/ctrl/src/start.c
index cad72c9..e734b86 100644
--- a/modules/ctrl/src/start.c
+++ b/modules/ctrl/src/start.c
@@ -108,6 +108,8 @@ static void start_load (void)
/* size & game init (sets errno) */
int rows;
int cols;
+
+ errno = 0;
game_init_load(&rows, &cols);
if (!errno) {