diff --git a/scripts/tests/e2/allies.lua b/scripts/tests/e2/allies.lua index 9f86e5f7c..ef38a97bf 100644 --- a/scripts/tests/e2/allies.lua +++ b/scripts/tests/e2/allies.lua @@ -23,7 +23,7 @@ function test_get_allies() assert_equal(0, #allies) f1:set_ally(f2, "give", true) allies = f1.allies - assert_not_nil(1, table.getn(allies)) + assert_not_nil(allies[f2.id]) assert_equal('table', type(allies[f2.id])) assert_equal(1, #allies[f2.id]) assert_equal("give", allies[f2.id][1]) diff --git a/src/bind_faction.c b/src/bind_faction.c index 7d33ab3ac..74730d69c 100644 --- a/src/bind_faction.c +++ b/src/bind_faction.c @@ -43,7 +43,10 @@ without prior permission by the authors of Eressea. #include #include #include -#include +#include // for bool +#include // for puts + +struct allies; int tolua_factionlist_next(lua_State * L) {