From 7b304da14bd4061cf70cd2dcc47ea6774d6c3cbe Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 14 Jul 2023 12:28:08 +0200 Subject: [PATCH] Check for minimal size in non-anchored Contact CTOR. --- hurricane/src/hurricane/Contact.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hurricane/src/hurricane/Contact.cpp b/hurricane/src/hurricane/Contact.cpp index 69e1d5c6..1d9c82af 100644 --- a/hurricane/src/hurricane/Contact.cpp +++ b/hurricane/src/hurricane/Contact.cpp @@ -118,6 +118,9 @@ Contact::Contact(Net* net, const Layer* layer, DbU::Unit x, DbU::Unit y, DbU::Un { if (not _layer) throw Error("Contact::Contact(): Can't create " + _TName("Contact") + ", NULL layer."); + + if ( _width < _layer->getMinimalSize() ) _width = _layer->getMinimalSize(); + if ( _height < _layer->getMinimalSize() ) _height = _layer->getMinimalSize(); } Contact::Contact(Net* net, Component* anchor, const Layer* layer, DbU::Unit dx, DbU::Unit dy, DbU::Unit width, DbU::Unit height)