diff --git a/layout/generic/nsTextTransformer.cpp b/layout/generic/nsTextTransformer.cpp index 3e807777754..db79c93a6c2 100644 --- a/layout/generic/nsTextTransformer.cpp +++ b/layout/generic/nsTextTransformer.cpp @@ -644,7 +644,7 @@ static PRInt32 CountGermanSzlig(const PRUnichar* aText, PRInt32 len) static void ReplaceGermanSzligToSS(PRUnichar* aText, PRInt32 len, PRInt32 szCnt) { PRUnichar *src, *dest; - src = aText + len; + src = aText + len - 1; dest = src + szCnt; while( (src!=dest) && (src >= aText) ) { diff --git a/layout/html/base/src/nsTextTransformer.cpp b/layout/html/base/src/nsTextTransformer.cpp index 3e807777754..db79c93a6c2 100644 --- a/layout/html/base/src/nsTextTransformer.cpp +++ b/layout/html/base/src/nsTextTransformer.cpp @@ -644,7 +644,7 @@ static PRInt32 CountGermanSzlig(const PRUnichar* aText, PRInt32 len) static void ReplaceGermanSzligToSS(PRUnichar* aText, PRInt32 len, PRInt32 szCnt) { PRUnichar *src, *dest; - src = aText + len; + src = aText + len - 1; dest = src + szCnt; while( (src!=dest) && (src >= aText) ) {