*fixed a wrong hash bug with string object.

This commit is contained in:
paladin-t 2016-01-26 19:38:05 +08:00
parent 61501884bf
commit 650813c666
3 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ Added a SET_IMPORTING_DIRS statement to the shell
Added friendly error promption when memory overflow
Added source file information to stepped handler
Fixed a wrong argument processing bug with variable arguments
Fixed a wrong hash bug with string object
Fixed a memory corruption bug with importing directory setting
Optimized cached list accessing

View File

@ -2247,7 +2247,8 @@ unsigned int _ht_hash_object(void* ht, void* d) {
h = o->type;
switch(o->type) {
case _DT_STRING:
result = 5 * h + _ht_hash_string(ht, o->data.string);
h = 5 * h + _ht_hash_string(ht, o->data.string);
result = h % self->array_size;
break;
#ifdef MB_ENABLE_CLASS

Binary file not shown.