From edfc4f8016089cd5f04fc491f83f31f034595bdd Mon Sep 17 00:00:00 2001 From: "harishd%netscape.com" Date: Wed, 17 Nov 1999 00:25:33 +0000 Subject: [PATCH] Unblocking bug 18679. [ scanner got into an infinte loop ] --- htmlparser/src/nsScanner.cpp | 7 ------- parser/htmlparser/src/nsScanner.cpp | 7 ------- 2 files changed, 14 deletions(-) diff --git a/htmlparser/src/nsScanner.cpp b/htmlparser/src/nsScanner.cpp index 4ca9088bbabf..c1b1618dac08 100644 --- a/htmlparser/src/nsScanner.cpp +++ b/htmlparser/src/nsScanner.cpp @@ -662,7 +662,6 @@ nsresult nsScanner::ReadIdentifier(nsString& aString) { } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -709,7 +708,6 @@ nsresult nsScanner::ReadNumber(nsString& aString) { } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -759,7 +757,6 @@ nsresult nsScanner::ReadWhitespace(nsString& aString) { } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -807,7 +804,6 @@ nsresult nsScanner::ReadWhile(nsString& aString, } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -856,7 +852,6 @@ nsresult nsScanner::ReadWhile(nsString& aString, } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -936,7 +931,6 @@ nsresult nsScanner::ReadUntil(nsString& aString, } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -986,7 +980,6 @@ nsresult nsScanner::ReadUntil(nsString& aString, } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; diff --git a/parser/htmlparser/src/nsScanner.cpp b/parser/htmlparser/src/nsScanner.cpp index 4ca9088bbabf..c1b1618dac08 100644 --- a/parser/htmlparser/src/nsScanner.cpp +++ b/parser/htmlparser/src/nsScanner.cpp @@ -662,7 +662,6 @@ nsresult nsScanner::ReadIdentifier(nsString& aString) { } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -709,7 +708,6 @@ nsresult nsScanner::ReadNumber(nsString& aString) { } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -759,7 +757,6 @@ nsresult nsScanner::ReadWhitespace(nsString& aString) { } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -807,7 +804,6 @@ nsresult nsScanner::ReadWhile(nsString& aString, } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -856,7 +852,6 @@ nsresult nsScanner::ReadWhile(nsString& aString, } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -936,7 +931,6 @@ nsresult nsScanner::ReadUntil(nsString& aString, } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset; @@ -986,7 +980,6 @@ nsresult nsScanner::ReadUntil(nsString& aString, } else { aString.Append(&theBuf[theOrigin],mOffset-theOrigin-1); - mOffset-=1; result=Peek(theChar); theBuf=mBuffer.GetUnicode(); theOrigin=mOffset;