fixed debug asserts to allow for offset=count, since offsets represent

the slots between content.
This commit is contained in:
buster%netscape.com 1999-01-22 19:06:27 +00:00
Родитель 3a4358dd74
Коммит 6c76015d98
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -72,7 +72,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad start child list");
children->GetLength(&count);
}
NS_ASSERTION(mStartOffset<count, "bad start offset");
NS_ASSERTION(mStartOffset<=count, "bad start offset");
textNode = mEndParent;
if (textNode)
@ -84,7 +84,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad end child list");
children->GetLength(&count);
}
NS_ASSERTION(mEndOffset<count, "bad end offset");
NS_ASSERTION(mEndOffset<=count, "bad end offset");
if (gNoisy)
printf ("DeleteRange: %d of %p to %d of %p\n",
mStartOffset, (void *)mStartParent, mEndOffset, (void *)mEndParent);

Просмотреть файл

@ -72,7 +72,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad start child list");
children->GetLength(&count);
}
NS_ASSERTION(mStartOffset<count, "bad start offset");
NS_ASSERTION(mStartOffset<=count, "bad start offset");
textNode = mEndParent;
if (textNode)
@ -84,7 +84,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad end child list");
children->GetLength(&count);
}
NS_ASSERTION(mEndOffset<count, "bad end offset");
NS_ASSERTION(mEndOffset<=count, "bad end offset");
if (gNoisy)
printf ("DeleteRange: %d of %p to %d of %p\n",
mStartOffset, (void *)mStartParent, mEndOffset, (void *)mEndParent);

Просмотреть файл

@ -72,7 +72,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad start child list");
children->GetLength(&count);
}
NS_ASSERTION(mStartOffset<count, "bad start offset");
NS_ASSERTION(mStartOffset<=count, "bad start offset");
textNode = mEndParent;
if (textNode)
@ -84,7 +84,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad end child list");
children->GetLength(&count);
}
NS_ASSERTION(mEndOffset<count, "bad end offset");
NS_ASSERTION(mEndOffset<=count, "bad end offset");
if (gNoisy)
printf ("DeleteRange: %d of %p to %d of %p\n",
mStartOffset, (void *)mStartParent, mEndOffset, (void *)mEndParent);