[PATCH 06/16] wmtv: Do not shorten user config file.

Doug Torrance <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
Patch by Nicolas Boullis <[email protected]>.  From [1]:

   From: Nicolas Boullis <[email protected]>
   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;
 		}
-- 
2.5.0


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.