From 028b9d8d4ba2507f401f50bc22bbbef39d350665 Mon Sep 17 00:00:00 2001 From: Christian Schlittchen Date: Sun, 14 Apr 2002 10:59:06 +0000 Subject: [PATCH] - Crashfixes --- src/common/gamecode/economy.c | 2 +- src/common/kernel/spell.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index e60b19715..685507562 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -583,7 +583,7 @@ givemen(int n, unit * u, unit * u2, const char * cmd) error = 73; } else if (u2 && (has_skill(u, SK_MAGIC) || has_skill(u2, SK_MAGIC))) { error = 158; - } else if (fval(u, UFL_WERE) != fval(u2, UFL_WERE)) { + } else if (u2 && fval(u, UFL_WERE) != fval(u2, UFL_WERE)) { error = 312; } else { if (n > u->number) n = u->number; diff --git a/src/common/kernel/spell.c b/src/common/kernel/spell.c index abf6c9f7f..8c48de448 100644 --- a/src/common/kernel/spell.c +++ b/src/common/kernel/spell.c @@ -2936,7 +2936,7 @@ cw_read(attrib * a, FILE * f) curse_read(a, f); br->self = c; - fscanf(f, "%d ", &br->id); + fscanf(f, "%u ", &br->id); ur_add((void *)br->id, (void**)&wc->wall, resolve_borderid); ur_add((void *)br, (void**)&wc->buddy, resolve_buddy); return AT_READ_OK; @@ -4934,7 +4934,7 @@ sp_icastle(castorder *co) spellparameter *pa = co->par; icastle_data * data; - if((type=bt_find(pa->param[0]->data.s)) == NOBUILDING) { + if((type=findbuildingtype(pa->param[0]->data.s, mage->faction->locale)) == NULL) { type = bt_find("castle"); }