Fix more problems caused by padding in the Capability structure
[ghc-hetmet.git] / rts / Interpreter.c
index 4324f7f..1b2d730 100644 (file)
@@ -1422,7 +1422,7 @@ run_BCO:
             ffi_call(cif, fn, ret, argptrs);
 
            // And restart the thread again, popping the RET_DYN frame.
-           cap = (Capability *)((void *)((unsigned char*)resumeThread(tok) - sizeof(StgFunTable)));
+           cap = (Capability *)((void *)((unsigned char*)resumeThread(tok) - FIELD_OFFSET(Capability,r)));
            LOAD_STACK_POINTERS;
 
             // Re-load the pointer to the BCO from the RET_DYN frame,