Looks like memory gets corrupted and keys and values get switched. Check out this example snippet of code:
var Hashtable = require('hashtable');
var ht = new Hashtable();
ht.put('key_1', 'value_1');
ht.put('key_1', 'value_1'); // repeating same put
ht.put('key_2', 'value_2');
var value = ht.get('key_1');
console.log(value); // should be "value_1", but is not.
This should output "value_1", but instead it outputs "key_2", which makes no sense. It seems that if you repeat a put on the same key, it corrupts memory.
Looks like memory gets corrupted and keys and values get switched. Check out this example snippet of code:
This should output "value_1", but instead it outputs "key_2", which makes no sense. It seems that if you repeat a put on the same key, it corrupts memory.
Node v0.10.33, OS X 10.10.1, Hashtable v0.5.2.