From eb1c785d4fbe5022fcfb4d3c5f55aebb5282e283 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 11 Feb 2004 16:28:22 +0000 Subject: Shift the array correctly. Fixes #134055, patch by Tosten Schoenfeld 2004-02-11 Federico Mena Quintero * gtk/gtkicontheme.c (gtk_icon_theme_prepend_search_path): Shift the array correctly. Fixes #134055, patch by Tosten Schoenfeld . --- gtk/gtkicontheme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gtk') diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 93f09c7c58..01a91f5635 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -747,8 +747,8 @@ gtk_icon_theme_prepend_search_path (GtkIconTheme *icon_theme, priv->search_path_len++; priv->search_path = g_renew (gchar *, priv->search_path, priv->search_path_len); - for (i = 0; i < priv->search_path_len - 1; i++) - priv->search_path[i+1] = priv->search_path[i]; + for (i = priv->search_path_len - 1; i > 0; i--) + priv->search_path[i] = priv->search_path[i - 1]; priv->search_path[0] = g_strdup (path); -- cgit v1.2.1