fixes needed to get multi-fragment strings working; r|a=waterson

git-svn-id: svn://10.0.0.236/trunk@75978 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scc%mozilla.org
2000-08-10 06:36:54 +00:00
parent fac6eb1451
commit e98f6c2c7c
9 changed files with 39 additions and 33 deletions

View File

@@ -83,6 +83,8 @@ copy_string_backward( InputIterator first, InputIterator last, OutputIterator re
{
while ( first != last )
{
last.normalize_backward();
result.normalize_backward();
PRUint32 lengthToCopy = PRUint32( NS_MIN(last.size_backward(), result.size_backward()) );
if ( first.fragment().mStart == last.fragment().mStart )
lengthToCopy = NS_MIN(lengthToCopy, PRUint32(last.get() - first.get()));