Index: smartdisperse.c =================================================================== --- smartdisperse.c (revision 24882) +++ smartdisperse.c (revision 24883) @@ -65,7 +65,7 @@ dx += PCB->hidlib.grid; /* Figure out if this row has room. If not, start a new row */ - if (minx != GAP && GAP + sc->BoundingBox.X2 + dx > PCB->MaxWidth) { + if (minx != GAP && GAP + sc->BoundingBox.X2 + dx > PCB->hidlib.size_x) { miny = maxy + GAP; minx = GAP; place_subc(sc); /* recurse can't loop, now minx==GAP */