summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 74f1de9)
raw | patch | inline | side by side (parent: 74f1de9)
author | Jeffrey Middleton <jefromi@gmail.com> | |
Wed, 25 Mar 2009 15:46:32 +0000 (10:46 -0500) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 27 Mar 2009 07:25:10 +0000 (08:25 +0100) |
screen-list produced errors due to empty fields between multiple
consecutive delimiters. Check to make sure the field is nonempty before
attempting to parse it.
enable-bell is not used at all (it has been replaced by audible- and
visible-bell).
consecutive delimiters. Check to make sure the field is nonempty before
attempting to parse it.
enable-bell is not used at all (it has been replaced by audible- and
visible-bell).
src/conf.c | patch | blob | history |
diff --git a/src/conf.c b/src/conf.c
index 1dc1a4333c9d99b918643854ca9b6ee5af083756..1d6d1b8f421dc79af4db923bb96ab6b5df450de6 100644 (file)
--- a/src/conf.c
+++ b/src/conf.c
#define CONF_ENABLE_COLORS "enable-colors"
#define CONF_AUTO_CENTER "auto-center"
#define CONF_WIDE_CURSOR "wide-cursor"
-#define CONF_ENABLE_BELL "enable-bell"
#define CONF_KEY_DEFINITION "key"
#define CONF_COLOR "color"
#define CONF_COLOR_DEFINITION "colordef"
j=0;
while( tmp && tmp[i] ) {
char *name = g_ascii_strdown(tmp[i], -1);
- if (screen_lookup_name(name) == NULL) {
- /* an unknown screen name was specified in the
- configuration file */
- print_error(_("Unknown screen name"), name);
- free(name);
- } else {
- screen = g_realloc(screen, (j+2)*sizeof(char *));
- screen[j++] = name;
- screen[j] = NULL;
+ if (*name != '\0') {
+ if (screen_lookup_name(name) == NULL) {
+ /* an unknown screen name was specified in the
+ configuration file */
+ print_error(_("Unknown screen name"), name);
+ free(name);
+ } else {
+ screen = g_realloc(screen, (j+2)*sizeof(char *));
+ screen[j++] = name;
+ screen[j] = NULL;
+ }
}
i++;
}