From 848c801f230e7bb4ad2ceee8992e18672d459ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Pais?= Date: Sat, 23 Dec 2017 02:38:12 +0100 Subject: [PATCH] Bug fix in zLib MTF --- precomp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/precomp.h b/precomp.h index abbfcf0..c56bc88 100644 --- a/precomp.h +++ b/precomp.h @@ -122,7 +122,8 @@ public: if (Index==Root) return; List[ List[Index].Previous ].Next = List[Index].Next; - List[ List[Index].Next ].Previous = List[Index].Previous; + if (List[Index].Next>=0) + List[ List[Index].Next ].Previous = List[Index].Previous; List[Root].Previous = Index; List[Index].Next = Root; List[Root=Index].Previous = -1;