aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/conf.c2
-rw-r--r--src/playlist.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/src/conf.c b/src/conf.c
index 2a5ea9e5f..2a0ab2077 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -372,7 +372,7 @@ int getBoolConfigParam(char *name)
if (strcmp("yes", param->value) == 0) return 1;
else if (strcmp("no", param->value) == 0) return 0;
- return -1;
+ return -2;
}
BlockParam *getBlockParam(ConfigParam * param, char *name)
diff --git a/src/playlist.c b/src/playlist.c
index c7ef9d17f..fce6cfe3b 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -167,7 +167,14 @@ void initPlaylist(void)
}
playlist_saveAbsolutePaths = getBoolConfigParam(CONF_SAVE_ABSOLUTE_PATHS);
- playlist_saveAbsolutePaths = playlist_saveAbsolutePaths < 0 ? 0 : playlist_saveAbsolutePaths;
+ if (playlist_saveAbsolutePaths == -1) playlist_saveAbsolutePaths = 0;
+ else if (playlist_saveAbsolutePaths < 0) {
+ param = getConfigParam(CONF_SAVE_ABSOLUTE_PATHS);
+ ERROR("%s is not \"yes\" or \"no\" on line %i\n"
+ CONF_SAVE_ABSOLUTE_PATHS,
+ param->value, param->line);
+ exit(EXIT_FAILURE);
+ }
playlist.songs = malloc(sizeof(Song *) * playlist_max_length);
playlist.songMod = malloc(sizeof(mpd_uint32) * playlist_max_length);