diff options
| author | novalis <novalis@novalis.org> | 2013-09-01 21:32:03 -0400 |
|---|---|---|
| committer | novalis <novalis@novalis.org> | 2013-09-01 22:35:19 -0400 |
| commit | c4bb88364eaac3104271b42be15d64d704aee055 (patch) | |
| tree | 330f005a94cf560fee4e915665af661de0b70d7c /src/libstd | |
| parent | 73a28e595c2aacf38c12a56807547e7cda6839ee (diff) | |
| download | rust-c4bb88364eaac3104271b42be15d64d704aee055.tar.gz rust-c4bb88364eaac3104271b42be15d64d704aee055.zip | |
Fix #8898
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/repr.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/repr.rs b/src/libstd/repr.rs index 3e2c5773acc..003dda294da 100644 --- a/src/libstd/repr.rs +++ b/src/libstd/repr.rs @@ -381,10 +381,11 @@ impl<'self> TyVisitor for ReprVisitor<'self> { } } - fn visit_evec_fixed(&mut self, _n: uint, sz: uint, _align: uint, + fn visit_evec_fixed(&mut self, n: uint, sz: uint, _align: uint, mtbl: uint, inner: *TyDesc) -> bool { + let assumed_size = if sz == 0 { n } else { sz }; do self.get::<()> |this, b| { - this.write_vec_range(mtbl, ptr::to_unsafe_ptr(b), sz, inner); + this.write_vec_range(mtbl, ptr::to_unsafe_ptr(b), assumed_size, inner); } } |
