[totem] grilo: Search page is 0-indexed



commit 0dc7035cd01942feac7546f38998a51b616146c1
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Oct 12 10:26:53 2012 +0200

    grilo: Search page is 0-indexed
    
    Fix possible crash when skipping -PAGE_SIZE items when doing a
    search. Spotted by Marco Piazza <mpiazza gmail com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686003

 src/plugins/grilo/totem-grilo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index ca26b2a..3f31ea4 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -649,7 +649,7 @@ search_more (TotemGriloPlugin *self)
 
 	default_options = grl_operation_options_new (NULL);
 	grl_operation_options_set_flags (default_options, BROWSE_FLAGS);
-	grl_operation_options_set_skip (default_options, (self->priv->search_page - 1) * PAGE_SIZE);
+	grl_operation_options_set_skip (default_options, self->priv->search_page * PAGE_SIZE);
 	grl_operation_options_set_count (default_options, PAGE_SIZE);
 
 	gtk_widget_set_sensitive (self->priv->search_entry, FALSE);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]