Skip to content

Commit

Permalink
🍑 fix for !7
Browse files Browse the repository at this point in the history
  • Loading branch information
orca-zhang committed Jan 28, 2022
1 parent 4dddf1a commit 8c25851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ecache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c25851

Please # to comment.