From ef1a2de98e6a520bbacd022baf58c03f125b2f01 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Wed, 11 May 2016 11:49:53 +0200 Subject: [PATCH] Fixed toFront opertaion in LRU logic of base tile hashing. Tests now pass. --- common/basetilehash.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/basetilehash.go b/common/basetilehash.go index 89a8518..fe6dc9f 100644 --- a/common/basetilehash.go +++ b/common/basetilehash.go @@ -43,8 +43,11 @@ func (bth *BaseTileHash) toFront(entry *btHashEntry) { } entry.prev.next = entry.next entry.next.prev = entry.prev + entry.next = bth.root.next entry.prev = &bth.root + + bth.root.next.prev = entry bth.root.next = entry }