diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-03-19 12:28:16 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-03-19 12:28:16 +0100 |
commit | 2eab16a3103a1ba8804d937f1087d2e3f8ab7886 (patch) | |
tree | b4ac2e226d8ad32769e6fd8df1838360447c4fbd | |
parent | 94afe13373a1afe595075f31ad8ade9dcf125b20 (diff) | |
download | vdr-2eab16a3103a1ba8804d937f1087d2e3f8ab7886.tar.gz vdr-2eab16a3103a1ba8804d937f1087d2e3f8ab7886.tar.bz2 |
Fixed cReadLine::Read() for lines that end with the infamous "\r\n"
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | tools.c | 10 |
3 files changed, 12 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 52afb654..11bd25dd 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -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 @@ -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). @@ -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; |