Some crashes and other minor stuff.

Just things that Eressea has changed in the past 2 months
This commit is contained in:
Enno Rehling 2013-04-28 03:13:40 +02:00
parent f6b5728b49
commit ed4c4aa363
4 changed files with 6 additions and 4 deletions

View File

@ -7290,6 +7290,7 @@
<string name="nr_insectfall">
<text locale="de">Es ist Spätherbst, und diese Woche ist die letzte vor dem Winter, in der Insekten rekrutieren können.</text>
<text locale="en">It is the last week before winter in which insects can still recruit.</text>
</string>
<string name="nr_owner">

View File

@ -72,9 +72,10 @@ attack_firesword(const troop * at, const struct weapon_type *wtype,
do {
dt = select_enemy(fi, 0, 1, SELECT_ADVANCE | SELECT_DISTANCE);
assert(dt.fighter);
--force;
if (dt.fighter) {
killed += terminate(dt, *at, AT_SPELL, damage, 1);
}
} while (force && killed < enemies);
if (casualties)
*casualties = killed;

View File

@ -1788,7 +1788,7 @@ int reports(void)
static variant var_copy_string(variant x)
{
x.v = strdup((const char *)x.v);
x.v = x.v?strdup((const char *)x.v):0;
return x;
}

View File

@ -283,7 +283,7 @@ static const char *parse_string(opstack ** stack, const char *in,
if (ic == NULL)
return NULL;
c = (char *)opop_v(stack);
bytes = (int)strlcpy(oc, c, size);
bytes = (int)c?strlcpy(oc, c, size):0;
if (bytes < (int)size)
oc += bytes;
else