diff --git a/HISTORY b/HISTORY index 74bbe77..86c57da 100755 --- a/HISTORY +++ b/HISTORY @@ -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 diff --git a/core/my_basic.c b/core/my_basic.c index 157af20..fcf6c64 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -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 diff --git a/output/my_basic.exe b/output/my_basic.exe index 71a430d..16e10d3 100755 Binary files a/output/my_basic.exe and b/output/my_basic.exe differ