From bc8c39f4bb88b5cff5f6cc4942da5297ae4ae5d3 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 26 Mar 2016 22:08:54 +0100 Subject: [PATCH] fix message-crash https://bugs.eressea.de/view.php?id=2199 release version 3.8.7 --- res/core/messages.xml | 12 ++++++------ src/buildno.h | 2 +- src/kernel/xmlreader.c | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/res/core/messages.xml b/res/core/messages.xml index 4044f6de6..9a207ad5f 100644 --- a/res/core/messages.xml +++ b/res/core/messages.xml @@ -22,9 +22,9 @@ - "$unit($unit) in $region($region): '$order($command)' - Ungültige Zielregion." - "$unit($unit) in $region($region): '$order($command)' - invalid target region." + "$unit($unit) in $region($region): '$order($command)' - Ungültige Zielregion." + "$unit($unit) in $region($region): '$order($command)' - invalid target region." @@ -32,9 +32,9 @@ - "$unit($unit) in $region($region): '$order($command)' - keine Richtung angegeben." - "$unit($unit) in $region($region): '$order($command)' - no direction was specified." + "$unit($unit) in $region($region): '$order($command)' - keine Richtung angegeben." + "$unit($unit) in $region($region): '$order($command)' - no direction was specified." @@ -42,9 +42,9 @@ - "$unit($unit) in $region($region): '$order($command)' - In der Zielregion befinden sich noch Einheiten." - "$unit($unit) in $region($region): '$order($command)' - There are units in the target region." + "$unit($unit) in $region($region): '$order($command)' - In der Zielregion befinden sich noch Einheiten." + "$unit($unit) in $region($region): '$order($command)' - There are units in the target region." diff --git a/src/buildno.h b/src/buildno.h index 39668bfb9..3a7947aaa 100644 --- a/src/buildno.h +++ b/src/buildno.h @@ -1,3 +1,3 @@ #define VERSION_MAJOR 3 #define VERSION_MINOR 8 -#define VERSION_BUILD 6 +#define VERSION_BUILD 7 diff --git a/src/kernel/xmlreader.c b/src/kernel/xmlreader.c index 86a49983a..e1e476cd6 100644 --- a/src/kernel/xmlreader.c +++ b/src/kernel/xmlreader.c @@ -1981,6 +1981,7 @@ static int parse_messages(xmlDocPtr doc) /* strings */ xpath->node = node; result = xmlXPathEvalExpression(BAD_CAST "text", xpath); + assert(result->nodesetval->nodeNr>0); for (k = 0; k != result->nodesetval->nodeNr; ++k) { xmlNodePtr node = result->nodesetval->nodeTab[k]; struct locale *lang;