config/Block: add method GetPositiveValue()
Adds missing checks to several plugins.
This commit is contained in:
@@ -74,7 +74,7 @@ fluidsynth_mpd_log_function(int level, char *message, gcc_unused void *data)
|
||||
static bool
|
||||
fluidsynth_init(const ConfigBlock &block)
|
||||
{
|
||||
sample_rate = block.GetBlockValue("sample_rate", 48000u);
|
||||
sample_rate = block.GetPositiveValue("sample_rate", 48000u);
|
||||
CheckSampleRate(sample_rate);
|
||||
|
||||
soundfont_path = block.GetBlockValue("soundfont",
|
||||
|
Reference in New Issue
Block a user