changeset 625:745b09e3f8bc

Ignore empty lines in control files
author xi
date Sat, 03 Feb 2007 01:16:00 +1100
parents 4bbcd4559cca
children a07129231d84
files ChangeLog src/ctrlvalues.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jan 15 08:32:48 2007 +1100
+++ b/ChangeLog	Sat Feb 03 01:16:00 2007 +1100
@@ -1,3 +1,4 @@
+ o Ignore empty lines in control files
 1.2.13
  o Added Dutch listtexts (Raymond den Ouden)
 1.2.13-RC1
--- a/src/ctrlvalues.c	Mon Jan 15 08:32:48 2007 +1100
+++ b/src/ctrlvalues.c	Sat Feb 03 01:16:00 2007 +1100
@@ -52,6 +52,9 @@
 	ret->strs = NULL;
 	while((value = mygetline(ctrlfd)) != NULL) {
 		chomp(value);
+		/* Ignore empty lines */
+		if (*value == '\0')
+			continue;
 		ret->count++;
 		ret->strs = (char **) myrealloc(ret->strs, sizeof(char *) *
 					(ret->count + 1));