diff options
Diffstat (limited to 'common/place_common.cc')
-rw-r--r-- | common/place_common.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/place_common.cc b/common/place_common.cc index b02904ec..0b7a0352 100644 --- a/common/place_common.cc +++ b/common/place_common.cc @@ -189,9 +189,15 @@ class ConstraintLegaliseWorker diameter = 1; } else if (sign == -1) { sign = 1; + if ((start + sign * diameter) > max) + sign = -1; ++diameter; } else { sign = -1; + if ((start + sign * diameter) > max) { + sign = 1; + ++diameter; + } } } |