summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-01-11 11:23:38 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-01-11 11:23:38 +0100
commit48de95f5d2ed662d724a765ec11aa0eb2ef7dfb9 (patch)
tree44e5c48c520fd1be22e2ff7b42ca340a28bcbc20
parent73ccde16e82fa9da0ee7c78e3fb1045b09f69c78 (diff)
downloadvdr-48de95f5d2ed662d724a765ec11aa0eb2ef7dfb9.tar.gz
vdr-48de95f5d2ed662d724a765ec11aa0eb2ef7dfb9.tar.bz2
Fixed cListBase::Move() in case From and To are equal
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--tools.c4
3 files changed, 5 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 0b56b0d2..08d651e8 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2553,6 +2553,7 @@ Sundararaj Reel <sundararaj.reel@googlemail.com>
for reporting a bug in handling symbolic links in cRecordings::ScanVideoDir()
for reporting a memory leak in cRecordings::ScanVideoDir() in case there are too
many link levels
+ for reporting a bug in cListBase::Move() in case From and To are equal
Ales Jurik <ajurik@quick.cz>
for reporting broken SI data on Czech/Slovak channels after changing the default
diff --git a/HISTORY b/HISTORY
index f6991d8d..8c53dafd 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6807,3 +6807,5 @@ Video Disk Recorder Revision History
descriptions with blanks (thanks to Torsten Lang for reporting a problem with
EPG data from BSkyB's "MTV MUSIC", S28.2E-2-2010-7012).
- Fixed cDvbSubtitleConverter::SetOsdData() (thanks to Rolf Ahrenberg).
+- Fixed cListBase::Move() in case From and To are equal (reported by Sundararaj
+ Reel).
diff --git a/tools.c b/tools.c
index 1a1cf3fe..778c4639 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 2.19 2011/12/04 14:52:38 kls Exp $
+ * $Id: tools.c 2.20 2012/01/11 11:21:43 kls Exp $
*/
#include "tools.h"
@@ -1913,7 +1913,7 @@ void cListBase::Move(int From, int To)
void cListBase::Move(cListObject *From, cListObject *To)
{
- if (From && To) {
+ if (From && To && From != To) {
if (From->Index() < To->Index())
To = To->Next();
if (From == objects)