CheckMemoryLeak: Fixed a bug: Don't erase "{ }", replace with ";"

This commit is contained in:
Daniel Marjamäki 2008-08-20 06:51:26 +00:00
parent 6bdb2ff0dc
commit e64eed909b
1 changed files with 3 additions and 2 deletions

View File

@ -699,10 +699,11 @@ static void CheckMemoryLeak_CheckScope( const TOKEN *Tok1, const char varname[]
done = false;
}
// Delete empty block
// Replace "{ }" with ";"
if ( Match(tok2->next, "{ }") )
{
erase(tok2, gettok(tok2,3));
tok2->next->str[0] = ';';
erase(tok2->next, gettok(tok2,3));
done = false;
}