summaryrefslogtreecommitdiff
path: root/i18n.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-06-15 13:01:18 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-06-15 13:01:18 +0200
commit1f7c70cd49046525519cc84cb118d246c71569dc (patch)
treed204cb8c4962a0d260b16da05b3a164cc36725e3 /i18n.c
parent3224fffe8751732ec3304d8f540e832929933f27 (diff)
downloadvdr-1f7c70cd49046525519cc84cb118d246c71569dc.tar.gz
vdr-1f7c70cd49046525519cc84cb118d246c71569dc.tar.bz2
Fixed a crash in i18n character set conversion
Diffstat (limited to 'i18n.c')
-rw-r--r--i18n.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/i18n.c b/i18n.c
index 88832d77..5ed05362 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.c 1.294 2007/06/09 08:44:54 kls Exp $
+ * $Id: i18n.c 1.295 2007/06/15 12:52:51 kls Exp $
*
* Translations provided by:
*
@@ -6820,7 +6820,7 @@ static const char *ConvertPhrase(const tI18nPhrase *Original, tI18nPhrase **Conv
*Converted = new tI18nPhrase[NumPhrases + 1];
memset(*Converted, 0, sizeof(tI18nPhrase) * (NumPhrases + 1));
}
- if (!(*Converted)[NrPhrase][NrLanguage]) {
+ if (!(*Converted)[NrPhrase][NrLanguage] && Original[NrPhrase][NrLanguage]) {
cCharSetConv csc(Phrases[1][NrLanguage], cCharSetConv::SystemCharacterTable());
(*Converted)[NrPhrase][NrLanguage] = strdup(csc.Convert(Original[NrPhrase][NrLanguage]));
}
@@ -6851,7 +6851,8 @@ const char *I18nTranslate(const char *s, const char *Plugin)
return t;
}
}
- p = Phrases;
+ p = OriginalPhrases = Phrases;
+ ConvertedPhrases = &Converted;
}
esyslog("%s%sno translation found for '%s' in language %d (%s)", Plugin ? Plugin : "", Plugin ? ": " : "", s, Setup.OSDLanguage, Phrases[0][Setup.OSDLanguage]);
}