Commit 856b74d7 authored by eric.carlson@apple.com's avatar eric.carlson@apple.com
Browse files

Unreviewed, fix Mac release build.

* page/CaptionUserPreferencesMac.mm:
(WebCore::languageIdentifier):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8fa6e667
2013-03-20 Eric Carlson <eric.carlson@apple.com>
Unreviewed, fix Mac release build.
* page/CaptionUserPreferencesMac.mm:
(WebCore::languageIdentifier):
2013-03-20 Eric Carlson <eric.carlson@apple.com>
 
Allow ports specific text track menu
......@@ -590,8 +590,9 @@ static String languageIdentifier(const String& languageCode)
return languageCode;
String lowercaseLanguageCode = languageCode.lower();
if (lowercaseLanguageCode.length() >= 3 && (lowercaseLanguageCode[2] == '_' || lowercaseLanguageCode[2] == '-'))
// Need 2U here to disambiguate String::operator[] from operator(NSString*, int)[] in a production build.
if (lowercaseLanguageCode.length() >= 3 && (lowercaseLanguageCode[2U] == '_' || lowercaseLanguageCode[2U] == '-'))
lowercaseLanguageCode.truncate(2);
return lowercaseLanguageCode;
......
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