From e169cbe9f19b499472b3f70e3819efa30abb98b8 Mon Sep 17 00:00:00 2001
From: Pedro Gonnet <gonnet@google.com>
Date: Wed, 17 May 2017 22:22:22 +0200
Subject: [PATCH] forgot to use the 'old' values.

---
 src/runner_doiact.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/runner_doiact.h b/src/runner_doiact.h
index 2217327915..8e46b0aa33 100644
--- a/src/runner_doiact.h
+++ b/src/runner_doiact.h
@@ -2281,10 +2281,10 @@ void DOSUB_PAIR1(struct runner *r, struct cell *ci, struct cell *cj, int sid,
 
     /* Do any of the cells need to be sorted first? */
     if (!(ci->sorted & (1 << sid)) ||
-        ci->dx_max_sort > ci->dmin * space_maxreldx)
+        ci->dx_max_sort_old > ci->dmin * space_maxreldx)
       error("Interacting unsorted cell.");
     if (!(cj->sorted & (1 << sid)) ||
-        cj->dx_max_sort > cj->dmin * space_maxreldx)
+        cj->dx_max_sort_old > cj->dmin * space_maxreldx)
       error("Interacting unsorted cell.");
 
 /* Compute the interactions. */
-- 
GitLab