Shims: No implicit dereferencing of pointers

This commit is contained in:
Dr. Chat 2017-05-17 04:45:31 -05:00
parent e388b74dbe
commit 4f0c0f2724
2 changed files with 2 additions and 2 deletions

View File

@ -210,7 +210,7 @@ class PrimitivePointerParam : public ParamBase<uint32_t> {
return reinterpret_cast<uintptr_t>(host_ptr_); return reinterpret_cast<uintptr_t>(host_ptr_);
} }
T value() const { return *host_ptr_; } T value() const { return *host_ptr_; }
operator T() const { return *host_ptr_; } operator T() const = delete;
operator xe::be<T>*() const { return host_ptr_; } operator xe::be<T>*() const { return host_ptr_; }
operator bool() const { return host_ptr_ != nullptr; } operator bool() const { return host_ptr_ != nullptr; }
void Zero() const { void Zero() const {

View File

@ -175,7 +175,7 @@ dword_result_t XamAlloc(dword_t unk, dword_t size, lpdword_t out_ptr) {
DECLARE_XAM_EXPORT(XamAlloc, ExportTag::kImplemented); DECLARE_XAM_EXPORT(XamAlloc, ExportTag::kImplemented);
dword_result_t XamFree(lpdword_t ptr) { dword_result_t XamFree(lpdword_t ptr) {
kernel_state()->memory()->SystemHeapFree(ptr); kernel_state()->memory()->SystemHeapFree(ptr.guest_address());
return X_ERROR_SUCCESS; return X_ERROR_SUCCESS;
} }