fix mac build with clang 7.3

This commit is contained in:
Enno Rehling 2016-08-31 09:26:48 +02:00 committed by Enno Rehling
parent a47b48cfbf
commit cd46bac132
4 changed files with 12 additions and 3 deletions

View File

@ -155,7 +155,7 @@ static race *rc_find_i(const char *name)
const char *rname = name;
race *rc = races;
while (rc && !strcmp(rname, rc->_name) == 0) {
while (rc && strcmp(rname, rc->_name) != 0) {
rc = rc->next;
}
if (!rc && strcmp(name, "uruk") == 0) {

View File

@ -41,11 +41,20 @@ static void test_rc_defaults(CuTest *tc) {
test_cleanup();
}
static void test_rc_find(CuTest *tc) {
race *rc;
test_cleanup();
rc = test_create_race("hungryhippos");
CuAssertPtrEquals(tc, rc, (void *)rc_find("hungryhippos"));
test_cleanup();
}
CuSuite *get_race_suite(void)
{
CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, test_rc_name);
SUITE_ADD_TEST(suite, test_rc_defaults);
SUITE_ADD_TEST(suite, test_rc_find);
return suite;
}

View File

@ -5354,7 +5354,7 @@ int sp_leaveastral(castorder * co)
u = pa->param[n]->data.u;
if (!ucontact(u, mage)) {
if (power > 10 && !pa->param[n]->flag == TARGET_RESISTS
if (power > 10 && !(pa->param[n]->flag == TARGET_RESISTS)
&& can_survive(u, rt)) {
ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order,
"feedback_no_contact_no_resist", "target", u));

2
tolua

@ -1 +1 @@
Subproject commit e53fe09e5789083698d2efb1fd36250efa700c34
Subproject commit 32cc6a3e78238278bc5b1fb8566526558e5afdda