Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37629899
en ru br
Репозитории ALT
S:2.8.0-alt1
5.1: 2.2.0-alt4
4.1: 2.2.0-alt2
4.0: 2.1.0-alt2
3.0: 1.5.1-alt1
www.altlinux.org/Changes

Группа :: Звук
Пакет: cmus

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: cmus.git-5feece0be8491287625b105af35d0091cbb05aa6.patch
Скачать


From 5feece0be8491287625b105af35d0091cbb05aa6 Mon Sep 17 00:00:00 2001
From: Gregory Petrosyan <gregory.petrosyan@gmail.com>
Date: Tue, 13 Nov 2012 22:36:26 +0400
Subject: [PATCH] lib: fix segfault caused by player-prev
On Tue, Nov 13, 2012 at 4:48 PM, Philipp Hartwig <ph@phhart.de> wrote:
> with git HEAD and an empty ~/.cmus, the following steps produce a segfault for
> me:
>
> First
>  set repeat=true
>  set aaa_mode=album
>
> Then add some album, play the first track and execute player-prev. The track
> selection should wrap around to the last track of the album, but instead cmus
> crashes.
Fix it by replacing bad line of code with the obviously correct one.
Reported-by: Philipp Hartwig <ph@phhart.de>
Signed-off-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
---
 lib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib.c b/lib.c
index f92451e..46ffe64 100644
--- a/lib.c
+++ b/lib.c
@@ -271,7 +271,7 @@ static struct tree_track *normal_get_prev(void)
 		if (!repeat)
 			return NULL;
 		/* last track of the album */
-		return to_tree_track(rb_prev(&CUR_ALBUM->tree_node));
+		return album_last_track(CUR_ALBUM);
 	}
 
 	/* not first album of the artist? */
-- 
1.7.3.3
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin