From d5bbe7ab3348f2832cfdabfd62df45466c479e5a Mon Sep 17 00:00:00 2001 From: "rickg%netscape.com" Date: Wed, 19 Jan 2000 02:38:33 +0000 Subject: [PATCH] Landing harish's fix to bug24190. r=rickg, a=chofmann --- htmlparser/src/nsScanner.cpp | 6 +++++- parser/htmlparser/src/nsScanner.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/htmlparser/src/nsScanner.cpp b/htmlparser/src/nsScanner.cpp index 9f85c2d3a175..89c712f0a5f2 100644 --- a/htmlparser/src/nsScanner.cpp +++ b/htmlparser/src/nsScanner.cpp @@ -367,6 +367,7 @@ nsresult nsScanner::FillBuffer(void) { nsresult result=NS_OK; if(!mInputStream) { +#if 0 //This is DEBUG code!!!!!! XXX DEBUG XXX //If you're here, it means someone tried to load a //non-existent document. So as a favor, we emit a @@ -374,8 +375,11 @@ nsresult nsScanner::FillBuffer(void) { if(0==mTotalRead) { mBuffer.Append((const char*)kBadHTMLText); mBuffer.Append(mFilename); + mTotalRead+=mBuffer.Length(); } - else result=kEOF; + else +#endif + result=kEOF; } else { PRInt32 numread=0; diff --git a/parser/htmlparser/src/nsScanner.cpp b/parser/htmlparser/src/nsScanner.cpp index 9f85c2d3a175..89c712f0a5f2 100644 --- a/parser/htmlparser/src/nsScanner.cpp +++ b/parser/htmlparser/src/nsScanner.cpp @@ -367,6 +367,7 @@ nsresult nsScanner::FillBuffer(void) { nsresult result=NS_OK; if(!mInputStream) { +#if 0 //This is DEBUG code!!!!!! XXX DEBUG XXX //If you're here, it means someone tried to load a //non-existent document. So as a favor, we emit a @@ -374,8 +375,11 @@ nsresult nsScanner::FillBuffer(void) { if(0==mTotalRead) { mBuffer.Append((const char*)kBadHTMLText); mBuffer.Append(mFilename); + mTotalRead+=mBuffer.Length(); } - else result=kEOF; + else +#endif + result=kEOF; } else { PRInt32 numread=0;