From 1ce39d373776afd396ebf9c20fdba885b8139ca1 Mon Sep 17 00:00:00 2001 From: "cvshook%sicking.cc" Date: Thu, 22 Jun 2006 22:05:20 +0000 Subject: [PATCH] Bug 338391: Properly check if IndexOf returned -1. Patch by dveditz, r/sr=sicking --- content/base/src/nsGenericElement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index 93680a85bd3d..5a0a395fc832 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -2483,7 +2483,7 @@ nsGenericElement::doRemoveChildAt(PRUint32 aIndex, PRBool aNotify, // was processing. if (guard.Mutated(0)) { aIndex = container->IndexOf(aKid); - if (aIndex < 0) { + if (NS_STATIC_CAST(PRInt32, aIndex) < 0) { return NS_OK; } }