forked from github/server
- Crashfixes
This commit is contained in:
parent
d076e53c4d
commit
028b9d8d4b
|
@ -583,7 +583,7 @@ givemen(int n, unit * u, unit * u2, const char * cmd)
|
||||||
error = 73;
|
error = 73;
|
||||||
} else if (u2 && (has_skill(u, SK_MAGIC) || has_skill(u2, SK_MAGIC))) {
|
} else if (u2 && (has_skill(u, SK_MAGIC) || has_skill(u2, SK_MAGIC))) {
|
||||||
error = 158;
|
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;
|
error = 312;
|
||||||
} else {
|
} else {
|
||||||
if (n > u->number) n = u->number;
|
if (n > u->number) n = u->number;
|
||||||
|
|
|
@ -2936,7 +2936,7 @@ cw_read(attrib * a, FILE * f)
|
||||||
|
|
||||||
curse_read(a, f);
|
curse_read(a, f);
|
||||||
br->self = c;
|
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->id, (void**)&wc->wall, resolve_borderid);
|
||||||
ur_add((void *)br, (void**)&wc->buddy, resolve_buddy);
|
ur_add((void *)br, (void**)&wc->buddy, resolve_buddy);
|
||||||
return AT_READ_OK;
|
return AT_READ_OK;
|
||||||
|
@ -4934,7 +4934,7 @@ sp_icastle(castorder *co)
|
||||||
spellparameter *pa = co->par;
|
spellparameter *pa = co->par;
|
||||||
icastle_data * data;
|
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");
|
type = bt_find("castle");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue