1
0
mirror of synced 2025-01-18 00:56:49 +01:00

patterns: Fixed local member access not working

This commit is contained in:
WerWolv 2021-07-31 12:18:32 +02:00
parent f4046fb8fc
commit bca7f738a1

View File

@ -117,8 +117,8 @@ namespace hex::lang {
currPattern = this->findPattern(*this->m_localVariables.back(), path);
// If no local variable was found try local structure members
if (this->m_currMembers.size() > 1) {
currPattern = this->findPattern(*this->m_currMembers[this->m_currMembers.size() - 2], path);
if (!this->m_currMembers.empty()) {
currPattern = this->findPattern(*this->m_currMembers.back(), path);
}
// If no local member was found, try globally