actor: Fix add_child_at_index() for negative index
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 9 Feb 2012 01:13:50 +0000 (02:13 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 9 Feb 2012 08:29:13 +0000 (09:29 +0100)
There is a typo in the check for a negative index: the index variable
should be index_, not index - unfortunately, the latter can still be
resolved to index(3), so compiler and linker are perfectly happy.

https://bugzilla.gnome.org/show_bug.cgi?id=669730

clutter/clutter-actor.c

index 7786b0d..c25a5f7 100644 (file)
@@ -9907,7 +9907,7 @@ insert_child_at_index (ClutterActor *self,
       child->priv->prev_sibling = NULL;
       child->priv->next_sibling = tmp;
     }
-  else if (index < 0)
+  else if (index_ < 0)
     {
       ClutterActor *tmp = self->priv->last_child;