Ruby NetDest: add assert for bad element in netdest

This commit is contained in:
Jason Power 2012-08-01 17:07:34 -05:00
parent 6a70ef30a3
commit 6721b3e325

View file

@ -38,6 +38,7 @@ NetDest::NetDest()
void
NetDest::add(MachineID newElement)
{
assert(bitIndex(newElement.num) < m_bits[vecIndex(newElement)].getSize());
m_bits[vecIndex(newElement)].add(bitIndex(newElement.num));
}