From f6f2dafaf726505095cb27eea58666bda71d4d55 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 30 Mar 2018 09:26:39 +1100 Subject: [PATCH] Make set -add replace existing value when applied to a map option --- src/option_types.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/option_types.hh b/src/option_types.hh index aae25dde..0617a183 100644 --- a/src/option_types.hh +++ b/src/option_types.hh @@ -142,7 +142,7 @@ bool option_add(HashMap& opt, StringView str) HashItem item; option_from_string(key_value[0], item.key); option_from_string(key_value[1], item.value); - opt.insert(std::move(item)); + opt[std::move(item.key)] = std::move(item.value); changed = true; } return changed;