From 842efab8ae867f001d5043a773ee96a7087c2334 Mon Sep 17 00:00:00 2001 From: Dean Eigenmann <7621705+decanus@users.noreply.github.com> Date: Mon, 6 Jul 2020 10:23:42 +0200 Subject: Update btrees.nim (#14916) --- compiler/btrees.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler') diff --git a/compiler/btrees.nim b/compiler/btrees.nim index 65edc54f3..18854d474 100644 --- a/compiler/btrees.nim +++ b/compiler/btrees.nim @@ -79,6 +79,9 @@ proc insert[Key, Val](h: Node[Key, Val], key: Key, val: Val): Node[Key, Val] = var j = 0 if not h.isInternal: while j < h.entries: + if eq(key, h.keys[j]): + h.vals[j] = val + return if less(key, h.keys[j]): break inc j for i in countdown(h.entries, j+1): -- cgit 1.4.1-2-gfad0