From 2090a446291ba1c1c868da8eca743c1a4097ddcf Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Mon, 1 Feb 2016 00:45:13 -0500 Subject: [PATCH] wmtv: Do not shorten user config file. Patch by Nicolas Boullis . From [1]: From: Nicolas Boullis Subject: wmtv: shortens user's configuration file Date: Sun, 18 Nov 2001 02:38:00 +0100 Hello ! When wmtv writes it configuration back to the user's configuration file (after the user tried to fine-tune the channels) it forgets the last channel. And then... one can't start it any more without correcting the configuration file first. The patch included makes wmtv write all the channels back. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=120035 --- wmtv/src/wmtv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wmtv/src/wmtv.c b/wmtv/src/wmtv.c index bc160d5..fd482eb 100644 --- a/wmtv/src/wmtv.c +++ b/wmtv/src/wmtv.c @@ -1070,7 +1070,7 @@ WriteRCFile(const char *filename) while (fgets(temp, 128, fp)) { if (*temp != '\n' && strchr(temp, '[')) { fseek(fp, 0L, SEEK_CUR); /* required between read and write */ - for (i = 0; i < maxpst; i++) + for (i = 0; i <= maxpst; i++) fprintf(fp, "%s (%ld)\t%s", cname[i], ftune[i], comment[i]); break; }