summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-kids/lletters/files/lletters-0.1.95-nolang.patch')
-rw-r--r--games-kids/lletters/files/lletters-0.1.95-nolang.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/games-kids/lletters/files/lletters-0.1.95-nolang.patch b/games-kids/lletters/files/lletters-0.1.95-nolang.patch
new file mode 100644
index 00000000000..52ff642b8e1
--- /dev/null
+++ b/games-kids/lletters/files/lletters-0.1.95-nolang.patch
@@ -0,0 +1,14 @@
+Don't crash when LANG is not set
+
+--- lletters-0.1.95/lln.c 2020-10-03 20:22:43.470743688 +0100
++++ lletters-0.1.95/lln.c 2020-10-03 20:31:03.322335396 +0100
+@@ -138,7 +138,8 @@ main (int argc, char *argv[])
+ /* End change by Gopal Narayanan */
+
+ /* Change by Lalo Martins, Feb 27 1999: */
+- lang = strtok(getenv ("LANG"), "_");
++ char* envlang = getenv("LANG");
++ lang = strtok(envlang ? envlang : "", "_");
+ // lang = strtok(lang, "_");
+
+ if (!lang)