Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 53b9ca8

Browse files
Merge pull request #145 from livecode/bugfix-21387
[[ Bug 21387 ]] Fix bug in Win32 stdcall closure trampoline
2 parents 32f388e + bebedd5 commit 53b9ca8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libffi/src/x86/win32.asm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,8 @@ ffi_closure_raw_SYSV ENDP
12831283

12841284

12851285
ffi_closure_STDCALL PROC NEAR FORCEFRAME
1286-
mov eax, [esp] ;; the ffi_closure ctx passed by the trampoline.
1286+
;; FORCEFRAME pushes onto the stack, so the ctx ptr is one word above
1287+
mov eax, [esp + 4] ;; the ffi_closure ctx passed by the trampoline.
12871288

12881289
sub esp, 40
12891290
lea edx, [ebp - 24]

0 commit comments

Comments
 (0)