Browse Source

Fixed memory corruption bug by explicitly initializing the pointer to null.

pull/155/merge
triton 12 years ago
parent
commit
a112faef52
  1. 2
      src/CppParser/Parser.cpp
  2. 2
      src/Parser/Parser.cpp

2
src/CppParser/Parser.cpp

@ -1977,7 +1977,7 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity( @@ -1977,7 +1977,7 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity(
auto& P = C->getPreprocessor();
PreprocessedEntity* Entity;
PreprocessedEntity* Entity = 0;
switch(PPEntity->getKind())
{

2
src/Parser/Parser.cpp

@ -2000,7 +2000,7 @@ CppSharp::AST::PreprocessedEntity^ Parser::WalkPreprocessedEntity( @@ -2000,7 +2000,7 @@ CppSharp::AST::PreprocessedEntity^ Parser::WalkPreprocessedEntity(
auto& P = C->getPreprocessor();
CppSharp::AST::PreprocessedEntity^ Entity;
CppSharp::AST::PreprocessedEntity^ Entity = nullptr;
switch(PPEntity->getKind())
{

Loading…
Cancel
Save