diff options
-rw-r--r-- | public/common/util.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/public/common/util.js b/public/common/util.js index 0979178..c14d406 100644 --- a/public/common/util.js +++ b/public/common/util.js @@ -262,15 +262,15 @@ function map_set(map, key, value) { array_insert_pair(map, a<<1, key, value) } -function map_delete(map, item) { +function map_delete(map, key) { let a = 0 let b = (map.length >> 1) - 1 while (a <= b) { let m = (a + b) >> 1 let x = map[m<<1] - if (item < x) + if (key < x) b = m - 1 - else if (item > x) + else if (key > x) a = m + 1 else { array_remove_pair(map, m<<1) |