]> git.pond.sub.org Git - empserver/commitdiff
(main): Initialize game_turn to one instead of zero.
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 27 Jul 2007 18:23:03 +0000 (18:23 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 27 Jul 2007 18:23:03 +0000 (18:23 +0000)
src/util/files.c

index a4649f01ee8cdffc4d512f315324672d901d97be..341dc8143b2c077122fa159e2eff9f5095cf91a9 100644 (file)
@@ -83,7 +83,7 @@ main(int argc, char *argv[])
     char buf[255];
     char *filename;
     int x, y;
-    struct gamestr *game;
+    struct gamestr game;
     struct natstr nat;
     struct realmstr realm;
     struct sctstr sct;
@@ -145,7 +145,10 @@ main(int argc, char *argv[])
            exit(1);
        }
     }
-    ef_extend(EF_GAME, 1);
+    memset(&game, 0, sizeof(game));
+    game.ef_type = EF_GAME;
+    game.game_turn = 1;
+    ef_write(EF_GAME, 0, &game);
     memset(&nat, 0, sizeof(nat));
     nat.ef_type = EF_NATION;
     strcpy(nat.nat_cnam, "POGO");