From 843ee0f1c61946a822b47b57ce134bd3d383dc1b Mon Sep 17 00:00:00 2001 From: "rickg%netscape.com" Date: Mon, 26 Oct 1998 22:33:39 +0000 Subject: [PATCH] fixed bug in IsOrdered that was found on the web git-svn-id: svn://10.0.0.236/trunk@13494 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/base/src/nsString.cpp | 2 +- mozilla/string/obsolete/nsString.cpp | 2 +- mozilla/xpcom/ds/nsString.cpp | 2 +- mozilla/xpcom/string/obsolete/nsString.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla/base/src/nsString.cpp b/mozilla/base/src/nsString.cpp index 7084e7bcc1a..f5777d0a29b 100644 --- a/mozilla/base/src/nsString.cpp +++ b/mozilla/base/src/nsString.cpp @@ -159,7 +159,7 @@ PRBool nsString::IsOrdered(void) const { if(mLength>1) { PRInt32 theIndex; for(theIndex=1;theIndex=mStr[theIndex]) { + if(mStr[theIndex-1]>mStr[theIndex]) { result=PR_FALSE; break; } diff --git a/mozilla/string/obsolete/nsString.cpp b/mozilla/string/obsolete/nsString.cpp index 7084e7bcc1a..f5777d0a29b 100644 --- a/mozilla/string/obsolete/nsString.cpp +++ b/mozilla/string/obsolete/nsString.cpp @@ -159,7 +159,7 @@ PRBool nsString::IsOrdered(void) const { if(mLength>1) { PRInt32 theIndex; for(theIndex=1;theIndex=mStr[theIndex]) { + if(mStr[theIndex-1]>mStr[theIndex]) { result=PR_FALSE; break; } diff --git a/mozilla/xpcom/ds/nsString.cpp b/mozilla/xpcom/ds/nsString.cpp index 7084e7bcc1a..f5777d0a29b 100644 --- a/mozilla/xpcom/ds/nsString.cpp +++ b/mozilla/xpcom/ds/nsString.cpp @@ -159,7 +159,7 @@ PRBool nsString::IsOrdered(void) const { if(mLength>1) { PRInt32 theIndex; for(theIndex=1;theIndex=mStr[theIndex]) { + if(mStr[theIndex-1]>mStr[theIndex]) { result=PR_FALSE; break; } diff --git a/mozilla/xpcom/string/obsolete/nsString.cpp b/mozilla/xpcom/string/obsolete/nsString.cpp index 7084e7bcc1a..f5777d0a29b 100644 --- a/mozilla/xpcom/string/obsolete/nsString.cpp +++ b/mozilla/xpcom/string/obsolete/nsString.cpp @@ -159,7 +159,7 @@ PRBool nsString::IsOrdered(void) const { if(mLength>1) { PRInt32 theIndex; for(theIndex=1;theIndex=mStr[theIndex]) { + if(mStr[theIndex-1]>mStr[theIndex]) { result=PR_FALSE; break; }