diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-10-20 08:50:09 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-10-20 08:50:09 +0200 |
commit | 5780c16004944fd29f8a37bf40a877cb15e51488 (patch) | |
tree | ae6c1d511c92083402d186617a1a97c80586e565 /plugin | |
parent | a21ab2d9260bd4cb1af1de0b8cd4cad9e9687861 (diff) |
Fix broken disk stream size limit in plugin config.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/drumgizmo_plugin.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index 5614014..6e4fe3c 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -538,6 +538,18 @@ int str2int(std::string a) } } +long long str2ll(std::string a) +{ + try + { + return std::stoll(a); + } + catch(...) + { + return 0; + } +} + } // end anonymous namespace DrumGizmoPlugin::ConfigStringIO::ConfigStringIO(Settings& settings) @@ -638,7 +650,7 @@ bool DrumGizmoPlugin::ConfigStringIO::set(std::string config_string) if(p.value("disk_cache_upper_limit") != "") { - settings.disk_cache_upper_limit.store(str2int(p.value("disk_cache_upper_limit"))); + settings.disk_cache_upper_limit.store(str2ll(p.value("disk_cache_upper_limit"))); } if(p.value("disk_cache_chunk_size") != "") |