diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 7484b917..7119b906 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2585,6 +2585,8 @@ Markus Ehrnsperger was no event with RunningStatus() >= SI::RunningStatusPausing for reporting problem with duplicate events if they are moved to a lower table ID and at the same time get a new event ID + for reporting a bug in handling negative values in cSource::Position() on + systems where 'int' is 64 bit Werner Färber for reporting a bug in handling the cPluginManager::Active() result when pressing @@ -2847,6 +2849,8 @@ Winfried K for reporting a compiler warning with gcc 14.1.0 for suggesting to remove defining DEPRECATED_* macros with value 0, because this is the preprocessor's default + for suggesting a fix for handling negative values in cSource::Position() on + systems where 'int' is 64 bit Hans-Werner Hilse for adding the command line option --userdump to enable core dumps in case VDR diff --git a/HISTORY b/HISTORY index f51d5b77..244eae42 100644 --- a/HISTORY +++ b/HISTORY @@ -10021,8 +10021,10 @@ Video Disk Recorder Revision History - Fixed a problem with duplicate events if they are moved to a lower table ID and at the same time get a new event ID (reported by Markus Ehrnsperger). -2024-10-08: +2024-10-09: - Removed defining DEPRECATED_* macros with value 0, because this is the preprocessor's default (suggested by Winfried Köhler). - Fixed error checking in case of large PTS discontinuities (reported by Matthias Senzel). +- Fixed handling negative values in cSource::Position() on systems where 'int' is 64 bit + (reported by Markus Ehrnsperger, fix suggested by Winfried Köhler). diff --git a/sources.c b/sources.c index f0a34327..27f15a70 100644 --- a/sources.c +++ b/sources.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sources.c 3.6 2014/03/09 12:05:42 kls Exp $ + * $Id: sources.c 5.1 2024/10/09 10:36:16 kls Exp $ */ #include "sources.h" @@ -46,10 +46,7 @@ bool cSource::Matches(int Code1, int Code2) int cSource::Position(int Code) { - int n = (Code & st_Pos); - if (n > 0x00007FFF) - n |= 0xFFFF0000; - return n; + return int16_t(Code & st_Pos); } cString cSource::ToString(int Code)