From db83140753ac29280e9533b6a7ae4c614a822f38 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 25 Feb 2018 20:49:33 +0100 Subject: [PATCH] merge conflict nightmare fix. --- src/eressea.c | 2 -- src/give.c | 4 ++-- src/helpers.c | 3 --- src/kernel/connection.c | 1 - src/util/base36.c | 2 +- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/eressea.c b/src/eressea.c index 3e59b4490..81f19b5a6 100644 --- a/src/eressea.c +++ b/src/eressea.c @@ -49,8 +49,6 @@ void game_done(void) free_gamedata(); creport_cleanup(); report_cleanup(); -#endif -#endif calendar_cleanup(); free_functions(); free_config(); diff --git a/src/give.c b/src/give.c index d013ea5a4..c47f9b9e2 100644 --- a/src/give.c +++ b/src/give.c @@ -163,9 +163,9 @@ int give_quota(const unit * src, const unit * dst, const item_type * type, } if (dst && src && src->faction != dst->faction) { static int config; - static double divisor = 1.0; + static int divisor = 1; if (config_changed(&config)) { - divisor = config_get_flt("rules.items.give_divisor", divisor); + divisor = config_get_int("rules.items.give_divisor", divisor); } assert(divisor <= 0 || divisor >= 1); if (divisor >= 1) { diff --git a/src/helpers.c b/src/helpers.c index 9d370a6e2..3b966785b 100644 --- a/src/helpers.c +++ b/src/helpers.c @@ -252,9 +252,6 @@ static int lua_use_item(unit *u, const item_type *itype, const char * fname, int amount, struct order *ord) { lua_State *L = (lua_State *)global.vm_state; - int len, result = 0; - char fname[64]; - int (*callout)(unit *, const item_type *, int, struct order *); lua_getglobal(L, fname); if (lua_isfunction(L, -1)) { diff --git a/src/kernel/connection.c b/src/kernel/connection.c index 636c49bd0..9cfe9c140 100644 --- a/src/kernel/connection.c +++ b/src/kernel/connection.c @@ -242,7 +242,6 @@ void b_read(connection * b, gamedata * data) default: assert(!"invalid variant type in connection"); } - assert(result >= 0 || !"EOF encountered?"); } void b_write(const connection * b, storage * store) diff --git a/src/util/base36.c b/src/util/base36.c index 30020de30..3b5543e88 100644 --- a/src/util/base36.c +++ b/src/util/base36.c @@ -103,7 +103,7 @@ const char *itoa36_r(int i, char *result, size_t len) { return itoab_r(i, 36, result, len); } - + const char *itoab(int i, int base) { static char sstr[80];