From 8c2585121542dd674f7ec777457f62e3309e6a76 Mon Sep 17 00:00:00 2001 From: Orca Date: Fri, 28 Jan 2022 16:29:00 +0800 Subject: [PATCH] :peach: fix for !7 --- ecache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecache.go b/ecache.go index 3c220e7..bd2df00 100644 --- a/ecache.go +++ b/ecache.go @@ -57,7 +57,7 @@ type cache struct { } func create(cap uint16) *cache { - return &cache{make([][2]uint16, cap+1), make([]node, cap), make(map[string]uint16, cap), 0} + return &cache{make([][2]uint16, uint32(cap)+1), make([]node, cap), make(map[string]uint16, cap), 0} } // put a cache item into lru cache, if added return 1, updated return 0