diff --git a/src/rime/config/config_data.cc b/src/rime/config/config_data.cc index 8a4d8b3660..47969f5375 100644 --- a/src/rime/config/config_data.cc +++ b/src/rime/config/config_data.cc @@ -2,6 +2,8 @@ // Copyright RIME Developers // Distributed under the BSD License // +#include +#include #include #include #include @@ -87,7 +89,7 @@ bool ConfigData::SaveToFile(const string& file_name) { } bool ConfigData::IsListItemReference(const string& key) { - return !key.empty() && key[0] == '@'; + return key.length() > 1 && key[0] == '@' && std::isalnum(key[1]); } string ConfigData::FormatListIndex(size_t index) {