mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed cReadLine::Read() for lines that end with the infamous "\r\n"
This commit is contained in:
parent
94afe13373
commit
2eab16a310
@ -964,6 +964,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
|
||||
exceeds the maximum channel number
|
||||
for suggesting to also set the language codes when setting the audio track descriptions
|
||||
for reporting a problem in setting the audio language codes in 'Transfer-Mode'
|
||||
for fixing cReadLine::Read() for lines that end with the infamous "\r\n"
|
||||
|
||||
Ralf Klueber <ralf.klueber@vodafone.com>
|
||||
for reporting a bug in cutting a recording if there is only a single editing mark
|
||||
|
4
HISTORY
4
HISTORY
@ -4415,7 +4415,7 @@ Video Disk Recorder Revision History
|
||||
- Fixed cSchedule::GetFollowingEvent() in case there is currently no present event
|
||||
running (thanks to Pekka Mauno).
|
||||
|
||||
2006-02-28: Version 1.3.45
|
||||
2006-03-19: Version 1.3.45
|
||||
|
||||
- Fixed updating the "Info" button in the "Timers" menu.
|
||||
- Reduced the number of events to actually check when setting events to timers.
|
||||
@ -4424,3 +4424,5 @@ Video Disk Recorder Revision History
|
||||
- The status changes of EPG events are now logged for all channels that have timers.
|
||||
- Removed the log message "deleting plugin: ..." when shutting down VDR (thanks to
|
||||
Christoph Haubrich for reporting that this is irritating when calling "vdr --help").
|
||||
- Fixed cReadLine::Read() for lines that end with the infamous "\r\n" (thanks to
|
||||
Rolf Ahrenberg).
|
||||
|
10
tools.c
10
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 1.114 2006/02/05 11:05:56 kls Exp $
|
||||
* $Id: tools.c 1.115 2006/03/19 12:28:16 kls Exp $
|
||||
*/
|
||||
|
||||
#include "tools.h"
|
||||
@ -829,8 +829,14 @@ char *cReadLine::Read(FILE *f)
|
||||
int n = getline(&buffer, &size, f);
|
||||
if (n > 0) {
|
||||
n--;
|
||||
if (buffer[n] == '\n')
|
||||
if (buffer[n] == '\n') {
|
||||
buffer[n] = 0;
|
||||
if (n > 0) {
|
||||
n--;
|
||||
if (buffer[n] == '\r')
|
||||
buffer[n] = 0;
|
||||
}
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user