From 47010478bcc5c6d29b306aab243db66b8c683c57 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Tue, 5 Feb 2019 09:10:31 +0100 Subject: [PATCH] Fix missmerge, ReadField() may only be called once for each field. --- src/header/local.h | 4 +--- src/savegame/savegame.c | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/header/local.h b/src/header/local.h index 70d543e..2d38dcf 100644 --- a/src/header/local.h +++ b/src/header/local.h @@ -641,14 +641,12 @@ typedef struct int ofs; fieldtype_t type; int flags; - short save_ver; + short save_ver; } field_t; - extern field_t fields[]; extern gitem_t itemlist[]; - // // g_cmds.c // diff --git a/src/savegame/savegame.c b/src/savegame/savegame.c index 5046823..8c917c9 100644 --- a/src/savegame/savegame.c +++ b/src/savegame/savegame.c @@ -709,8 +709,6 @@ ReadClient(FILE *f, gclient_t *client, short save_ver) for (field = clientfields; field->name; field++) { - ReadField(f, field, (byte *)client); - if (field->save_ver <= save_ver) { ReadField(f, field, (byte *)client);