From 0fc545a6e25275d3a4c79685d32d2eb22fe98e98 Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Tue, 28 Jan 2025 18:34:39 +0300 Subject: [PATCH] Fix xpointer constructor for null pointers. --- XenonUtils/xbox.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XenonUtils/xbox.h b/XenonUtils/xbox.h index 790d440..0361b0f 100644 --- a/XenonUtils/xbox.h +++ b/XenonUtils/xbox.h @@ -105,7 +105,7 @@ struct xpointer { } - xpointer(T* ptr) : ptr(reinterpret_cast(ptr) - reinterpret_cast(MmGetHostAddress(0))) + xpointer(T* p) : ptr(p != nullptr ? (reinterpret_cast(p) - reinterpret_cast(MmGetHostAddress(0))) : 0) { }