if (!eat_entry_)
return STATUS_INVALID_PARAMETER;
- size_t thunk_bytes = GetInternalThunkSize();
-
#if defined(_WIN64)
// We have two thunks, in order: the return path and the forward path.
if (!SetInternalThunk(thunk_storage, storage_bytes, NULL, target_))
return STATUS_BUFFER_TOO_SMALL;
+ size_t thunk_bytes = GetInternalThunkSize();
storage_bytes -= thunk_bytes;
thunk_storage = reinterpret_cast<char*>(thunk_storage) + thunk_bytes;
#endif