- Fix crash if LANG is not set in env

- Bump PORTREVISION

PR:		ports/121473
Submitted by:	Gerard Seibert <gerard@seibercom.net>,
		patch from Mel <fbsd.questions@rachie.is-a-geek.net>
This commit is contained in:
Ion-Mihai Tetcu 2008-05-06 07:38:19 +00:00
parent e7e239d19a
commit ea705d39bf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=212712
2 changed files with 13 additions and 1 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= gsnapshot
PORTVERSION= 1.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= SF

View file

@ -0,0 +1,12 @@
--- ./src/language.c.orig 2007-07-16 01:05:23.000000000 +0300
+++ ./src/language.c 2008-05-06 10:20:22.000000000 +0300
@@ -335,6 +335,9 @@
{
if (spoken == NULL) {
char *lang = getenv("LANG");
+ if(!lang)
+ return TranslationEnglish[label].locale;
+
if (strcmp(lang, "de") == 0 || strcmp(lang, "de_DE") == 0)
spoken = TranslationGerman;
else if (strcmp(lang, "es") == 0 || strcmp(lang, "es_ES") == 0)