Calling front() on an empty() list is undefined
This commit is contained in:
parent
30f1de9062
commit
e55d9454da
4
pform.cc
4
pform.cc
|
|
@ -790,8 +790,8 @@ bool pform_in_interface()
|
|||
|
||||
static bool pform_at_module_level()
|
||||
{
|
||||
return (lexical_scope == pform_cur_module.front())
|
||||
|| (lexical_scope == pform_cur_generate);
|
||||
return (!pform_cur_module.empty() && (lexical_scope == pform_cur_module.front())) ||
|
||||
(lexical_scope == pform_cur_generate);
|
||||
}
|
||||
|
||||
PWire*pform_get_wire_in_scope(perm_string name)
|
||||
|
|
|
|||
Loading…
Reference in New Issue