deny matching any class if class is explicitly requested

This commit is contained in:
john30
2014-12-26 20:03:21 +01:00
parent 7a394bc13b
commit 5b560ea27c
+3 -1
View File
@@ -409,8 +409,10 @@ Message* MessageMap::find(const string& clazz, const string& name, const bool is
string key;
if (i==0)
key = string(isPassive ? "P" : (isSet ? "W" : "R")) + clazz + FIELD_SEPARATOR + name;
else
else if (clazz.length() == 0)
key = string(isPassive ? "-P" : (isSet ? "-W" : "-R")) + name; // second try: without class
else
continue; // not allowed without class
map<string, Message*>::iterator it = m_messagesByName.find(key);
if (it != m_messagesByName.end())
return it->second;