From 0645578305402834a8e8e958f0192e54e3b1a950 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 14 Dec 2014 15:23:28 +0100 Subject: [PATCH] bugfix: could not GIVE to TEMP units. https://bugs.eressea.de/view.php?id=2052 --- src/give.c | 2 +- src/kernel/config.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/give.c b/src/give.c index f64bf0a51..71928f630 100644 --- a/src/give.c +++ b/src/give.c @@ -518,7 +518,7 @@ void give_unit(unit * u, unit * u2, order * ord) bool can_give_to(unit *u, unit *u2) { /* Damit Tarner nicht durch die Fehlermeldung enttarnt werden können */ - if (!u2 || u2->number == 0) { + if (!u2) { return false; } if (u2 && !alliedunit(u2, u->faction, HELP_GIVE) diff --git a/src/kernel/config.c b/src/kernel/config.c index 0db12308d..cdc30618a 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -1016,9 +1016,9 @@ int read_unitid(const faction * f, const region * r) int getunit(const region * r, const faction * f, unit **uresult) { + unit *u2 = NULL; int n = read_unitid(f, r); int result = GET_NOTFOUND; - unit *u2 = NULL; if (n == 0) { result = GET_PEASANTS;