vhdlpp: Fixed a crash in case of dynamic_cast failure.

This commit is contained in:
Maciej Suminski 2016-02-03 17:37:15 +01:00
parent bba312fee1
commit d20549b27a
1 changed files with 2 additions and 0 deletions

View File

@ -258,6 +258,8 @@ int ProcessStatement::rewrite_as_always_edge_(Entity*, Architecture*)
return -1;
const ExpCharacter*op2b = dynamic_cast<const ExpCharacter*>(op2b_raw);
if (op2b == 0)
return -1;
if (op2b->value() != '1' && op2b->value() != '0')
return -1;