diff --git a/lib/token.cpp b/lib/token.cpp index f43d03c52..d36f4acdf 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -455,6 +455,10 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid) } else { // %varid% if (varid == 0) { std::list locationList; + ErrorLogger::ErrorMessage::FileLocation loc; + loc.line = tok->linenr(); + loc.setfile(""); + locationList.push_back(loc); const ErrorLogger::ErrorMessage errmsg(locationList, Severity::error, "Internal error. Token::Match called with varid 0.",