From 7992d7209570d3c5c2d0e76345c4ce1bedc61b27 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Sat, 13 May 2000 00:47:48 +0000 Subject: [PATCH] Fix string backsliding. r=scc --- intl/strres/src/nsAcceptLang.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/intl/strres/src/nsAcceptLang.cpp b/intl/strres/src/nsAcceptLang.cpp index 5a9b5966c9e..ed2a3d6aba1 100644 --- a/intl/strres/src/nsAcceptLang.cpp +++ b/intl/strres/src/nsAcceptLang.cpp @@ -98,10 +98,10 @@ nsAcceptLang::GetAcceptLangFromLocale(const PRUnichar *aLocale, PRUnichar **_ret nsCString sTrue("true"); lc_tmp.ToLowerCase(); - lc_tmp = lc_tmp + sAccept; + lc_tmp.AppendWithConversion(sAccept); if (NS_OK == (res = bundle->GetStringFromName(lc_tmp.GetUnicode(), &ptrv))) { nsString tmp(ptrv); - if (tmp.Equals(sTrue)) { + if (tmp.EqualsWithConversion(sTrue)) { // valid name already *_retval = copyUnicode(lc_name); return res; @@ -131,11 +131,11 @@ nsAcceptLang::GetAcceptLangFromLocale(const PRUnichar *aLocale, PRUnichar **_ret // lang always in lower case; don't convert *_retval = copyUnicode(lang); - lang = lang + sAccept; + lang.AppendWithConversion(sAccept); if (NS_OK == (res = bundle->GetStringFromName(lang.GetUnicode(), &ptrv))) { nsString tmp(ptrv); - if (tmp.Equals(sTrue)) { + if (tmp.EqualsWithConversion(sTrue)) { /* lang is accepted */ return res; }