Initialize NetNet::port_index_

The port_index_ member of the NetNet is not initialized which can lead to
undefined behavior. Make sure to initialize to -1 to indicate that the net
is not associated with any port.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2023-04-14 07:12:18 -07:00
parent 9811c375a8
commit a68fe8ea0a
1 changed files with 1 additions and 1 deletions

View File

@ -825,7 +825,7 @@ class NetNet : public NetObj, public PortType {
std::vector<bool> lref_mask_;
std::vector<class NetDelaySrc*> delay_paths_;
int port_index_;
int port_index_ = -1;
};
/*