diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index 56dc764cf..8912377e1 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -1176,7 +1176,7 @@ bool CheckUninitVar::isVariableUsage(const Token *vartok) const } } - if (vartok->strAt(-1) == "[" || vartok->strAt(1) == "]") + if (vartok->strAt(1) == "]") return true; return false;