[vlc-commits] commit: Old RC: remove goto divide-by-two hack (fix #4236) ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Thu Oct 14 18:47:43 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 14 19:47:15 2010 +0300| [24188e89e466d724935a05fe67b393b7fb3958ce] | committer: Rémi Denis-Courmont 

Old RC: remove goto divide-by-two hack (fix #4236)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24188e89e466d724935a05fe67b393b7fb3958ce
---

 modules/control/rc.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index 81b95df..42b5ae6 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -1328,15 +1328,14 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
     {
         PL_LOCK;
         int i_pos = atoi( newval.psz_string );
-        /* The playlist stores 2 times the same item: onelevel & category */
-        int i_size = p_playlist->items.i_size / 2;
+        int i_size = p_playlist->items.i_size;
 
         if( i_pos <= 0 )
             msg_rc( "%s", _("Error: `goto' needs an argument greater than zero.") );
         else if( i_pos <= i_size )
         {
             playlist_item_t *p_item, *p_parent;
-            p_item = p_parent = p_playlist->items.p_elems[i_pos*2-1];
+            p_item = p_parent = p_playlist->items.p_elems[i_pos-1];
             while( p_parent->p_parent )
                 p_parent = p_parent->p_parent;
             playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Locked,



More information about the vlc-commits mailing list