1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed character comparisons in cSubtitleObject::DecodeCharacterString()

This commit is contained in:
Klaus Schmidinger 2012-05-08 08:27:24 +02:00
parent 353233a27e
commit 4f7523a3a2
3 changed files with 9 additions and 3 deletions

View File

@ -2873,3 +2873,7 @@ Ralf Schueler <dl4mw@schueler.ws>
Marcus Roscher <dad401@gmx.de> Marcus Roscher <dad401@gmx.de>
for reporting a problem with cDevice::StillPicture(), which called the derived class's for reporting a problem with cDevice::StillPicture(), which called the derived class's
function even if no buffer has been allocated function even if no buffer has been allocated
Reinhard Mantey <geronimo013@gmx.de>
for reporting a problem with character comparisons in
cSubtitleObject::DecodeCharacterString()

View File

@ -7052,7 +7052,7 @@ Video Disk Recorder Revision History
- Fixed handling IDLEPRIORITY in cDvbDevice::ProvidesChannel() (thanks to Frank - Fixed handling IDLEPRIORITY in cDvbDevice::ProvidesChannel() (thanks to Frank
Schmirler). Schmirler).
2012-05-06: Version 1.7.28 2012-05-08: Version 1.7.28
- Fixed cPixmapMemory::DrawEllipse() for quadrants -1 and -4. - Fixed cPixmapMemory::DrawEllipse() for quadrants -1 and -4.
- Fixed getting the maximum short channel name length in case there are no short names - Fixed getting the maximum short channel name length in case there are no short names
@ -7094,3 +7094,5 @@ Video Disk Recorder Revision History
- The new functions cControl::GetRecording() and cControl::GetHeader() can be used - The new functions cControl::GetRecording() and cControl::GetHeader() can be used
to retrieve information about what the current player is playing. to retrieve information about what the current player is playing.
- Fixed a possible high CPU load when pausing replay (thanks to Reinhard Nissl). - Fixed a possible high CPU load when pausing replay (thanks to Reinhard Nissl).
- Fixed character comparisons in cSubtitleObject::DecodeCharacterString() (reported
by Reinhard Mantey).

View File

@ -7,7 +7,7 @@
* Original author: Marco Schluessler <marco@lordzodiac.de> * Original author: Marco Schluessler <marco@lordzodiac.de>
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi> * With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
* *
* $Id: dvbsubtitle.c 2.31 2012/03/16 11:56:56 kls Exp $ * $Id: dvbsubtitle.c 2.32 2012/05/08 08:17:17 kls Exp $
*/ */
@ -217,7 +217,7 @@ void cSubtitleObject::DecodeCharacterString(const uchar *Data, int NumberOfCodes
char txt[NumberOfCodes + 1]; char txt[NumberOfCodes + 1];
char *p = txt; char *p = txt;
for (int i = 2; i < NumberOfCodes; ++i) { for (int i = 2; i < NumberOfCodes; ++i) {
char c = Data[i * 2 + 1] & 0xFF; uchar c = Data[i * 2 + 1] & 0xFF;
if (c == 0) if (c == 0)
break; break;
if (' ' <= c && c <= '~' || c == '\n' || 0xA0 <= c) if (' ' <= c && c <= '~' || c == '\n' || 0xA0 <= c)