Skip to content
Snippets Groups Projects
Commit ebc7a783 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

fix bug with @#ifdef in macroprocessor

parent f0e43f8a
Branches
No related tags found
No related merge requests found
...@@ -170,15 +170,11 @@ MacroDriver::begin_ifdef(const string &name) ...@@ -170,15 +170,11 @@ MacroDriver::begin_ifdef(const string &name)
try try
{ {
get_variable(name); get_variable(name);
const MacroValue *one = new IntMV(*this, 1); begin_if(new IntMV(*this, 1));
begin_if(one);
delete one;
} }
catch (UnknownVariable &) catch (UnknownVariable &)
{ {
const MacroValue *zero = new IntMV(*this, 0); begin_if(new IntMV(*this, 0));
begin_if(zero);
delete zero;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment