Fix string assertions. b=42936 code=jst,dbaron r=harishd

This commit is contained in:
dbaron@fas.harvard.edu
2000-06-21 00:53:34 +00:00
parent 1d6b305a55
commit 7b6ec0e75f
4 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -665,11 +665,11 @@ nsresult WriteText(const nsString& aTextString,nsIContentSink& aSink,PRBool aPre
PRUnichar theNextChar=0;
while(++theOffset<theEnd){
theNextChar=aTextString[theOffset-1];
//theNextChar=aTextString[theOffset-1];
theChar=aTextString[theOffset];
switch(theChar){
case kSpace:
theNextChar=aTextString[theOffset+1];
theNextChar=(theOffset+1 != theEnd) ? aTextString[theOffset+1] : '\0';
if((!aPlainText) && aPreserveSpace) { //&& ((kSpace==theNextChar) || (0==theNextChar)))
if(theTextOffset<theOffset) {
if(kSpace==theNextChar) {
@@ -705,7 +705,7 @@ nsresult WriteText(const nsString& aTextString,nsIContentSink& aSink,PRBool aPre
theTextOffset=theOffset--; //back up one on purpose...
}
else {
theNextChar=aTextString.CharAt(theOffset+1);
theNextChar=(theOffset+1 != theEnd) ? aTextString.CharAt(theOffset+1) : '\0';
if((kCR==theChar) && (kLF==theNextChar)) {
theOffset++;
}