summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY4
-rw-r--r--tools.c10
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
diff --git a/HISTORY b/HISTORY
index f92dc8f6..efe581a1 100644
--- a/HISTORY
+++ b/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).
diff --git a/tools.c b/tools.c
index fb887893..18f95376 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 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;