From 2e0e7af3f3c2411f54ce74276d0afd2514bbf039 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Thu, 30 Jul 2020 21:01:24 -0400 Subject: [PATCH] Corrected an error with the "slots" function that prevents slots from being generated in areas of negative coordinates when a grid limit is defined for the output style. --- VERSION | 2 +- cif/CIFgen.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index a8d813b2..49d92867 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.43 +8.3.44 diff --git a/cif/CIFgen.c b/cif/CIFgen.c index 4e268327..1095024a 100644 --- a/cif/CIFgen.c +++ b/cif/CIFgen.c @@ -3444,7 +3444,10 @@ calcX: delta = abs(*sxbot) % CIFCurStyle->cs_gridLimit; if (delta > 0) { - *axtop -= 2 * delta; + if (*sxbot >= 0) + *axtop -= 2 * delta; + else + *axtop += 2 * delta; goto calcX; } } @@ -3471,7 +3474,10 @@ calcY: delta = abs(*sybot) % CIFCurStyle->cs_gridLimit; if (delta > 0) { - *aytop -= 2 * delta; + if (*sybot >= 0) + *aytop -= 2 * delta; + else + *aytop += 2 * delta; goto calcY; } }