Divide vec fill by element size when reporting vec len.
This commit is contained in:
parent
0fe1508a8a
commit
fdf2eaac91
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ vec_buf(rust_task *task, type_desc *ty, rust_vec *v)
|
|||
extern "C" CDECL size_t
|
||||
vec_len(rust_task *task, type_desc *ty, rust_vec *v)
|
||||
{
|
||||
return v->fill;
|
||||
return v->fill / ty->size;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue