From 6a07c2f71a92ae1da9dfcdd3f3a7dc689a21b254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 21 Jan 2020 20:29:13 +0100 Subject: [PATCH] ExprEngine; Check struct member assignment --- lib/exprengine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/exprengine.cpp b/lib/exprengine.cpp index c01af1ab4..f2032edf7 100644 --- a/lib/exprengine.cpp +++ b/lib/exprengine.cpp @@ -2074,6 +2074,8 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer, if (!Token::simpleMatch(tok->astParent(), "=")) return; const Token *lhs = tok->astParent()->astOperand1(); + while (Token::simpleMatch(lhs, ".")) + lhs = lhs->astOperand2(); if (!lhs || !lhs->variable() || !lhs->variable()->nameToken()) return;