diff --git a/string/src/nsReadableUtils.cpp b/string/src/nsReadableUtils.cpp index 9b9dd7ab666d..a01023309ca9 100755 --- a/string/src/nsReadableUtils.cpp +++ b/string/src/nsReadableUtils.cpp @@ -441,6 +441,8 @@ class CopyToUpperCase char ch = *aSource; if ((ch >= 'a') && (ch <= 'z')) *cp = ch - ('a' - 'A'); + else + *cp = ch; ++aSource; ++cp; } @@ -535,6 +537,8 @@ class CopyToLowerCase char ch = *aSource; if ((ch >= 'A') && (ch <= 'Z')) *cp = ch + ('a' - 'A'); + else + *cp = ch; ++aSource; ++cp; } diff --git a/xpcom/string/src/nsReadableUtils.cpp b/xpcom/string/src/nsReadableUtils.cpp index 9b9dd7ab666d..a01023309ca9 100755 --- a/xpcom/string/src/nsReadableUtils.cpp +++ b/xpcom/string/src/nsReadableUtils.cpp @@ -441,6 +441,8 @@ class CopyToUpperCase char ch = *aSource; if ((ch >= 'a') && (ch <= 'z')) *cp = ch - ('a' - 'A'); + else + *cp = ch; ++aSource; ++cp; } @@ -535,6 +537,8 @@ class CopyToLowerCase char ch = *aSource; if ((ch >= 'A') && (ch <= 'Z')) *cp = ch + ('a' - 'A'); + else + *cp = ch; ++aSource; ++cp; }