Merge pull request #169 from badgerman/develop

bugfixes and crashes
This commit is contained in:
Enno Rehling 2015-04-17 21:36:33 +02:00
commit b7959a8fd8
2 changed files with 2 additions and 2 deletions

View File

@ -1321,7 +1321,7 @@ int ally_cmd(unit * u, struct order *ord)
s = gettoken(token, sizeof(token)); s = gettoken(token, sizeof(token));
if (!s[0]) if (s && !s[0])
keyword = P_ANY; keyword = P_ANY;
else else
keyword = findparam(s, u->faction->locale); keyword = findparam(s, u->faction->locale);

View File

@ -700,7 +700,7 @@ static void statistic_test(CuTest *tc, int peasants, int luck, int maxp,
for (i = 0; i < 1000; ++i) { for (i = 0; i < 1000; ++i) {
effect = peasant_luck_effect(peasants, luck, maxp, variance); effect = peasant_luck_effect(peasants, luck, maxp, variance);
CuAssertTrue(tc, min_value <= effect); CuAssertTrue(tc, min_value <= effect);
CuAssertTrue(tc, max_value >= effect); // broken CuAssertTrue(tc, max_value >= effect);
} }
} }