From 4ecae44b5e31f9ffb21666b133b7c89cbd58a803 Mon Sep 17 00:00:00 2001 From: Chen Gong Date: Fri, 15 Sep 2017 20:35:48 +0800 Subject: [PATCH] fix(config_compiler): null value should not overwrite a normal key in a merged tree --- src/rime/config/config_compiler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rime/config/config_compiler.cc b/src/rime/config/config_compiler.cc index 376cfb4754..5c0c28ecad 100644 --- a/src/rime/config/config_compiler.cc +++ b/src/rime/config/config_compiler.cc @@ -140,7 +140,7 @@ inline static bool IsMerging(const string& key, bool merge_tree) { return key == ConfigCompiler::MERGE_DIRECTIVE || boost::ends_with(key, ADD_SUFFIX_OPERATOR) || - (merge_tree && Is(value) && + (merge_tree && (!value || Is(value)) && !boost::ends_with(key, EQU_SUFFIX_OPERATOR)); }