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

git-svn-id: svn://10.0.0.236/trunk@72710 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%fas.harvard.edu
2000-06-21 00:53:34 +00:00
parent a86b544c90
commit 1e33476ff7
4 changed files with 16 additions and 16 deletions

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++;
}