Bug 59102, redux. After discussing with jar and rjc, we determined that the correct thing to do in this case is to continue to loop so long as either 1) the current enumerator mCurrent is still valid, or 2) there are more indices to try.

This commit is contained in:
waterson%netscape.com 2000-11-06 04:52:58 +00:00
parent 3a6e215aa1
commit 18a0fdcf2d

View File

@ -180,7 +180,7 @@ ContainerEnumeratorImpl::HasMoreElements(PRBool* aResult)
}
// Now iterate through each index.
while (mNextIndex <= count) {
while (mCurrent || mNextIndex < count) {
if (! mCurrent) {
NS_WITH_SERVICE(nsIRDFContainerUtils, rdfc, kRDFContainerUtilsCID, &rv);
if (NS_FAILED(rv)) return rv;