Fix out-of-bound with short layers names in GdsDriver::GdsStream.
* Bug: In CRL::GdsDriver::GdsStream::operator<<(Cell*), when looking for layer names ending with ".pin", must also check that the string is at least 4 characters long.
This commit is contained in:
parent
f58212eb96
commit
d6b01a557a
|
@ -821,7 +821,7 @@ namespace {
|
||||||
const BasicLayer* exportLayer = layer;
|
const BasicLayer* exportLayer = layer;
|
||||||
if (NetExternalComponents::isExternal(component)) {
|
if (NetExternalComponents::isExternal(component)) {
|
||||||
string layerName = getString( layer->getName() );
|
string layerName = getString( layer->getName() );
|
||||||
if (layerName.substr(layerName.size()-4) != ".pin") {
|
if ((layerName.size() > 4) and (layerName.substr(layerName.size()-4) != ".pin")) {
|
||||||
exportLayer = tech->getBasicLayer( layerName+".pin" );
|
exportLayer = tech->getBasicLayer( layerName+".pin" );
|
||||||
if (not exportLayer) exportLayer = layer;
|
if (not exportLayer) exportLayer = layer;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue