From bcfb7de2e510c88156157a8b8becd308f86af3c9 Mon Sep 17 00:00:00 2001 From: "jfrancis%netscape.com" Date: Thu, 1 Jul 1999 13:40:09 +0000 Subject: [PATCH] fixed bug in CompareEndPoints() --- content/base/src/nsRange.cpp | 2 +- layout/base/src/nsRange.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/base/src/nsRange.cpp b/content/base/src/nsRange.cpp index 64c520628039..a35c64e03e0a 100644 --- a/content/base/src/nsRange.cpp +++ b/content/base/src/nsRange.cpp @@ -1255,7 +1255,7 @@ nsresult nsRange::CompareEndPoints(PRUint16 how, nsIDOMRange* srcRange, if ((node1 == node2) && (offset1 == offset2)) *aCmpRet = 0; - else if (IsIncreasing(node1, offset2, node2, offset2)) + else if (IsIncreasing(node1, offset1, node2, offset2)) *aCmpRet = 1; else *aCmpRet = -1; diff --git a/layout/base/src/nsRange.cpp b/layout/base/src/nsRange.cpp index 64c520628039..a35c64e03e0a 100644 --- a/layout/base/src/nsRange.cpp +++ b/layout/base/src/nsRange.cpp @@ -1255,7 +1255,7 @@ nsresult nsRange::CompareEndPoints(PRUint16 how, nsIDOMRange* srcRange, if ((node1 == node2) && (offset1 == offset2)) *aCmpRet = 0; - else if (IsIncreasing(node1, offset2, node2, offset2)) + else if (IsIncreasing(node1, offset1, node2, offset2)) *aCmpRet = 1; else *aCmpRet = -1;