From 02c249d61e9a1bda77c77551ee9881d176efddd5 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 5 Dec 2015 17:33:41 +0100 Subject: [PATCH 1/3] fix not giving christmas trees https://bugs.eressea.de/view.php?id=2171 --- scripts/eressea/xmas.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/eressea/xmas.lua b/scripts/eressea/xmas.lua index 52fcf4c4e..37f2941f1 100644 --- a/scripts/eressea/xmas.lua +++ b/scripts/eressea/xmas.lua @@ -29,8 +29,10 @@ function self.init() local tbl = gifts[config.rules] if tbl then for _, gift in ipairs(tbl) do - if turn == gift.turn then - give_gifts(gift) + if gift.turn then + if gift.turn==turn then + give_gifts(gift) + end elseif gift.key and not get_key(gift.key) then give_gifts(gift) set_key(gift.key) From 435d8012393405dc55dbc1798ad8ead9cac41e67 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 5 Dec 2015 18:45:03 +0100 Subject: [PATCH 2/3] fix compiation problems after merge what is going on with this? why was critbit outdated? --- critbit | 2 +- src/reports.test.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/critbit b/critbit index dfe57a077..934c2dd94 160000 --- a/critbit +++ b/critbit @@ -1 +1 @@ -Subproject commit dfe57a077222c6b572da61a79dc0687f81c10055 +Subproject commit 934c2dd94d41da19637a76a1a8b3dfeb7aa8524d diff --git a/src/reports.test.c b/src/reports.test.c index 40870c435..da1c41a14 100644 --- a/src/reports.test.c +++ b/src/reports.test.c @@ -336,10 +336,13 @@ static void test_spell_syntax(CuTest *tc, char *msg, spell_fixture *spell, char while (linestart && !strstr(linestart, "ZAUBERE")) linestart = strtok(NULL, "\n") ; - CuAssertTrue(tc, (bool) linestart); + CuAssertPtrNotNull(tc, linestart); - while ((newline = strtok(NULL, "\n"))) - *(newline-1) = '\n'; + newline = strtok(NULL, "\n"); + while (newline) { + *(newline - 1) = '\n'; + newline = strtok(NULL, "\n"); + } CuAssertStrEquals_Msg(tc, msg, syntax, linestart); From c16beeef08f4645706cc1d0d22ddb43f741dfc20 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 5 Dec 2015 18:47:11 +0100 Subject: [PATCH 3/3] TODO: find out which test left those files behind. --- tests/runtests.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/runtests.bat b/tests/runtests.bat index 40554559b..4a0981ab2 100644 --- a/tests/runtests.bat +++ b/tests/runtests.bat @@ -11,3 +11,4 @@ SET SERVER=%BUILD%\eressea.exe %SERVER% ..\scripts\run-tests-e4.lua PAUSE RMDIR /s /q reports +DEL score score.alliances