From e0ae8ce47499fee6b34b4f4f0bf90c9c641f9f20 Mon Sep 17 00:00:00 2001 From: theraven Date: Thu, 7 Jul 2011 09:29:00 +0000 Subject: [PATCH] Another 64-bit issue. --- encoding2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/encoding2.c b/encoding2.c index ac4798d..c1e1051 100644 --- a/encoding2.c +++ b/encoding2.c @@ -505,9 +505,10 @@ void objc_layout_structure_get_info (struct objc_struct_layout *layout, { //printf("%p\n", layout); *type = layout->type; - *offset = layout->record_size / 8; + size_t off = layout->record_size / 8; *align= layout->record_align / 8; - round_up((size_t*)offset, (size_t)*align); + round_up(&off, (size_t)*align); + *offset = (unsigned int)off; } #ifdef ENCODING_TESTS