diff --git a/src/volcano.c b/src/volcano.c index fe4ce7dd3..d90ef47ee 100644 --- a/src/volcano.c +++ b/src/volcano.c @@ -225,7 +225,7 @@ volcano_destruction(region * volcano, region * r, const char *damage) if (!fval(u->faction, FFL_SELECT)) { fset(u->faction, FFL_SELECT); ADDMSG(&u->faction->msgs, msg_message("volcanooutbreaknn", - "region", r)); + "region", volcano)); } } if (u == *up) { diff --git a/src/volcano.test.c b/src/volcano.test.c index 3afa49651..693a029b4 100644 --- a/src/volcano.test.c +++ b/src/volcano.test.c @@ -43,6 +43,7 @@ static void test_volcano_outbreak(CuTest *tc) { test_setup(); mt_register(mt_new_va("volcanooutbreak", "regionv:region", "regionn:region", 0)); + mt_register(mt_new_va("volcanooutbreaknn", "region:region", 0)); mt_register(mt_new_va("volcano_dead", "unit:unit", "region:region", "dead:int", 0)); t_volcano = test_create_terrain("volcano", LAND_REGION); t_active = test_create_terrain("activevolcano", LAND_REGION); @@ -66,6 +67,9 @@ static void test_volcano_outbreak(CuTest *tc) { CuAssertPtrEquals(tc, r, m->parameters[0].v); CuAssertPtrEquals(tc, rn, m->parameters[1].v); + CuAssertPtrNotNull(tc, m = test_find_messagetype(f->msgs, "volcanooutbreaknn")); + CuAssertPtrEquals(tc, r, m->parameters[0].v); + CuAssertPtrNotNull(tc, m = test_find_messagetype_ex(f->msgs, "volcano_dead", NULL)); CuAssertPtrEquals(tc, u1, m->parameters[0].v); CuAssertPtrEquals(tc, r, m->parameters[1].v);