[totem/gnome-3-6] grilo: Search page is 0-indexed
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [totem/gnome-3-6] grilo: Search page is 0-indexed
- Date: Thu, 25 Oct 2012 08:53:40 +0000 (UTC)
commit 3aa819be9e94bf47c28a7642a44cd62268ab0024
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]