From a8c792706d68e3afd73067d3567d8dea671b0bae Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 30 Aug 2018 20:26:46 +1000 Subject: [PATCH] Fix setting a prefix list option with an empty list Fixes #2335 --- src/option_types.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/option_types.hh b/src/option_types.hh index 7d062deb..c6798ef5 100644 --- a/src/option_types.hh +++ b/src/option_types.hh @@ -350,6 +350,9 @@ inline String option_to_string(const PrefixedList& opt, Quoting quoting) template inline PrefixedList option_from_strings(Meta::Type>, ConstArrayView strs) { + if (strs.empty()) + return {{}, {}}; + return {option_from_string(Meta::Type

{}, strs[0]), option_from_strings(Meta::Type>{}, strs.subrange(1))}; }