Fix setting a prefix list option with an empty list

Fixes #2335
This commit is contained in:
Maxime Coste 2018-08-30 20:26:46 +10:00
parent df655422d1
commit a8c792706d

View File

@ -350,6 +350,9 @@ inline String option_to_string(const PrefixedList<P, T>& opt, Quoting quoting)
template<typename P, typename T>
inline PrefixedList<P, T> option_from_strings(Meta::Type<PrefixedList<P, T>>, ConstArrayView<String> strs)
{
if (strs.empty())
return {{}, {}};
return {option_from_string(Meta::Type<P>{}, strs[0]),
option_from_strings(Meta::Type<Vector<T, MemoryDomain::Options>>{}, strs.subrange(1))};
}