summaryrefslogtreecommitdiffstats
path: root/games/ufoai/patches/initialize-entityString.patch
diff options
context:
space:
mode:
Diffstat (limited to 'games/ufoai/patches/initialize-entityString.patch')
-rw-r--r--games/ufoai/patches/initialize-entityString.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/games/ufoai/patches/initialize-entityString.patch b/games/ufoai/patches/initialize-entityString.patch
new file mode 100644
index 0000000000..cdbf9e52bd
--- /dev/null
+++ b/games/ufoai/patches/initialize-entityString.patch
@@ -0,0 +1,26 @@
+From: Markus Koschany <apo@debian.org>
+Date: Tue, 25 Apr 2017 14:31:16 +0200
+Subject: initialize entityString
+
+Initialize entityString to avoid that ufo2map will randomly segfault when
+compiling the maps.
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860680
+Forwarded: https://sourceforge.net/p/ufoai/code/ci/bae827ba025ff1d3a56b402c27aa84401914acc4/
+---
+ src/tools/ufo2map/map.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/tools/ufo2map/map.cpp b/src/tools/ufo2map/map.cpp
+index 47c49f3..f56c55e 100644
+--- a/src/tools/ufo2map/map.cpp
++++ b/src/tools/ufo2map/map.cpp
+@@ -1227,7 +1227,7 @@ void LoadMapFile (const char* filename)
+ /* Set the number of tiles to 1. This is fix for ufo2map right now. */
+ mapTiles.numTiles = 1;
+
+- char entityString[MAX_TOKEN_CHARS];
++ char entityString[MAX_TOKEN_CHARS] = "";
+ const char* ump = GetUMPName(filename);
+ if (ump != nullptr)
+ ParseUMP(ump, entityString, false);