Browse Source

bugfix in remap

Nicolas Cannasse 9 năm trước cách đây
mục cha
commit
10f2053133
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/std/maps.c

+ 2 - 0
src/std/maps.c

@@ -55,6 +55,7 @@ static void hl_hbremap( hl_bytes_map *m, uchar *key, int hash, vdynamic *value,
 		c->hashes[c->nvalues] = hash;
 		c->strings[c->nvalues] = key;
 		c->values[c->nvalues] = value;
+		c->nvalues++;
 		return;
 	}
 	c = *reuse;
@@ -472,6 +473,7 @@ static void hl_horemap( hl_obj_map *m, vdynamic *key, vdynamic *value, hl_obj_ce
 	if( c && c->nvalues < H_CELL_SIZE ) {
 		c->keys[c->nvalues] = key;
 		c->values[c->nvalues] = value;
+		c->nvalues++;
 		return;
 	}
 	c = *reuse;