diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2010-07-05 14:40:01 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2010-07-05 14:40:01 -0700 |
| commit | fdf2eaac9179c6115235e53dbc84ecebeb246603 (patch) | |
| tree | 18204c70f4fd6dd516358c26ed290aa377c82e8d /src/rt/rust_builtin.cpp | |
| parent | 0fe1508a8a2512deff71bb760cc84e58d79debd4 (diff) | |
| download | rust-fdf2eaac9179c6115235e53dbc84ecebeb246603.tar.gz rust-fdf2eaac9179c6115235e53dbc84ecebeb246603.zip | |
Divide vec fill by element size when reporting vec len.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index eb84355f169..091ba9c9a35 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -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; } // |
