Avoid out of bounds
This commit is contained in:
parent
9ad46044b4
commit
3aa9d535f1
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000-2016 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2000-2016 Stephen Williams (steve@icarus.com)
|
||||||
|
* Copyright (c) 2016 CERN Michele Castellana (michele.castellana@cern.ch)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -508,6 +509,7 @@ void NetScope::add_module_port_info( unsigned idx, perm_string name, PortType::E
|
||||||
unsigned long width )
|
unsigned long width )
|
||||||
{
|
{
|
||||||
assert(type_ == MODULE);
|
assert(type_ == MODULE);
|
||||||
|
assert(ports_.size() > idx);
|
||||||
PortInfo &info = ports_[idx];
|
PortInfo &info = ports_[idx];
|
||||||
info.name = name;
|
info.name = name;
|
||||||
info.type = ptype;
|
info.type = ptype;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue