Author: mlandres Date: Thu Jul 12 13:06:06 2007 New Revision: 5987 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5987&view=rev Log: fixed evaluation of empty locale in TranslatedText Modified: branches/REFACTORING-10_3/libzypp/zypp/TranslatedText.cc Modified: branches/REFACTORING-10_3/libzypp/zypp/TranslatedText.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/TranslatedText.cc?rev=5987&r1=5986&r2=5987&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/TranslatedText.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/TranslatedText.cc Thu Jul 12 13:06:06 2007 @@ -54,6 +54,7 @@ { toReturn = ZConfig().defaultTextLocale(); } + do { TranslationMap::const_iterator it = translations.find( toReturn ); @@ -63,11 +64,18 @@ return it->second; } - // retry using fallback: - toReturn = toReturn.fallback(); - } while( toReturn != Locale::noCode ); - - // No match in fallback list. + if ( toReturn != Locale::noCode ) + { + // retry using next fallback: + toReturn = toReturn.fallback(); + } + else + { + // there are no further fallbacks + return std::string(); + } + } while( true ); + // not reached. return std::string(); } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org