From cab3ca935267b6025a15bfbe6dc4353e2f228399 Mon Sep 17 00:00:00 2001 From: Josh Davies Date: Fri, 27 Jun 2025 22:33:49 +0100 Subject: [PATCH] fix: regression in par=2 EndSort Revert one change of 1900651, which broke things in case a par=2 EndSort ends up in a file or PObuffer --- sources/sort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/sort.c b/sources/sort.c index b54bed72..0359b28b 100644 --- a/sources/sort.c +++ b/sources/sort.c @@ -997,7 +997,8 @@ LONG EndSort(PHEAD WORD *buffer, int par) } *((WORD **)buffer) = to; NCOPY(to,t,jj); - retval = to - buffer - 1; + /* we should not set retval here in this par==2 case, it being 0 has meaning + after RetRetval, and it is set properly there. */ } else { j = newout->POfill - t;