diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2012-01-09 15:12:18 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2012-01-09 15:12:18 +0100 |
| commit | 1ee9a83de09af1effe48ea13bc5cf89dd8221c8e (patch) | |
| tree | c309bd580815926f3a04c08332b66cd5086debd3 /src/rt | |
| parent | f30c5ea68611abaffece63787bd1f2c06854551b (diff) | |
| download | rust-1ee9a83de09af1effe48ea13bc5cf89dd8221c8e.tar.gz rust-1ee9a83de09af1effe48ea13bc5cf89dd8221c8e.zip | |
Fix bug in iface shape code
Issue #1437
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/rust_shape.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rt/rust_shape.h b/src/rt/rust_shape.h index 41be4c43d8b..e3041f23854 100644 --- a/src/rt/rust_shape.h +++ b/src/rt/rust_shape.h @@ -1005,7 +1005,10 @@ data<T,U>::walk_iface_value(ptr &dp) { type_desc *valtydesc = *reinterpret_cast<type_desc **>(body_ptr); ptr value_dp(body_ptr + sizeof(void*) * 2); - T sub(*static_cast<T *>(this), valtydesc->shape + 2, NULL, NULL, + // FIXME The 5 is a hard-coded way to skip over a struct shape + // header and the first two (number-typed) fields. This is too + // fragile, but I didn't see a good way to properly encode it. + T sub(*static_cast<T *>(this), valtydesc->shape + 5, NULL, NULL, value_dp); sub.align = true; sub.walk(); |
