diff --git a/src/kernel/build.test.c b/src/kernel/build.test.c index 1b3dda5fd..efac217ae 100644 --- a/src/kernel/build.test.c +++ b/src/kernel/build.test.c @@ -74,10 +74,10 @@ static void test_build_building_no_materials(CuTest *tc) { u = setup_build(&bf); btype = bt_find("castle"); assert(btype); - set_level(bf.u, SK_BUILDING, 1); - CuAssertIntEquals(tc, ENOMATERIALS, build_building(bf.u, btype, 0, 4, 0)); - CuAssertPtrEquals(tc, 0, bf.r->buildings); - CuAssertPtrEquals(tc, 0, bf.u->building); + set_level(u, SK_BUILDING, 1); + CuAssertIntEquals(tc, ENOMATERIALS, build_building(u, btype, 0, 4, 0)); + CuAssertPtrEquals(tc, 0, u->region->buildings); + CuAssertPtrEquals(tc, 0, u->building); } static void test_build_building_with_golem(CuTest *tc) { diff --git a/src/kernel/reports.h b/src/kernel/reports.h index f6df3ce85..16fa17b93 100644 --- a/src/kernel/reports.h +++ b/src/kernel/reports.h @@ -37,6 +37,7 @@ extern "C" { extern bool nonr; extern bool nocr; extern bool noreports; + extern const char *visibility[]; /* kann_finden speedups */ bool kann_finden(struct faction *f1, struct faction *f2); @@ -86,7 +87,6 @@ extern "C" { void free_seen(void); void link_seen(seen_region * seehash[], const struct region *first, const struct region *last); - const char *visibility[]; typedef struct report_context { struct faction *f;