Commit 58b66d49 authored by Marian Durkovic's avatar Marian Durkovic Committed by Derk-Jan Hartman

Ignore case when comparing ISO-639 language codes

Signed-off-by: default avatarDerk-Jan Hartman <hartman@videolan.org>
parent afd60281
......@@ -49,7 +49,7 @@ const iso639_lang_t * GetLang_1( const char * psz_code )
const iso639_lang_t *p_lang;
for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
if( !strncmp( p_lang->psz_iso639_1, psz_code, 2 ) )
if( !strncasecmp( p_lang->psz_iso639_1, psz_code, 2 ) )
return p_lang;
return &unknown_language;
......@@ -60,7 +60,7 @@ const iso639_lang_t * GetLang_2T( const char * psz_code )
const iso639_lang_t *p_lang;
for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
if( !strncmp( p_lang->psz_iso639_2T, psz_code, 3 ) )
if( !strncasecmp( p_lang->psz_iso639_2T, psz_code, 3 ) )
return p_lang;
return &unknown_language;
......@@ -71,7 +71,7 @@ const iso639_lang_t * GetLang_2B( const char * psz_code )
const iso639_lang_t *p_lang;
for( p_lang = p_languages; p_lang->psz_eng_name; p_lang++ )
if( !strncmp( p_lang->psz_iso639_2B, psz_code, 3 ) )
if( !strncasecmp( p_lang->psz_iso639_2B, psz_code, 3 ) )
return p_lang;
return &unknown_language;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment