Calling front() on an empty() list is undefined

This commit is contained in:
Cary R 2025-07-13 19:37:27 -07:00
parent 30f1de9062
commit e55d9454da
1 changed files with 2 additions and 2 deletions

View File

@ -790,8 +790,8 @@ bool pform_in_interface()
static bool pform_at_module_level() static bool pform_at_module_level()
{ {
return (lexical_scope == pform_cur_module.front()) return (!pform_cur_module.empty() && (lexical_scope == pform_cur_module.front())) ||
|| (lexical_scope == pform_cur_generate); (lexical_scope == pform_cur_generate);
} }
PWire*pform_get_wire_in_scope(perm_string name) PWire*pform_get_wire_in_scope(perm_string name)