diff options
Diffstat (limited to 'include/JSystem/JSupport')
| -rw-r--r-- | include/JSystem/JSupport/JSupport.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/JSystem/JSupport/JSupport.h b/include/JSystem/JSupport/JSupport.h index 0b9a37aec5..4f103bdf1a 100644 --- a/include/JSystem/JSupport/JSupport.h +++ b/include/JSystem/JSupport/JSupport.h @@ -23,11 +23,13 @@ T* JSUConvertOffsetToPtr(const void* ptr, uintptr_t offset) { */ template <typename T> T* JSUConvertOffsetToPtr(const void* ptr, const void* offset) { + T* ret; if (offset == NULL) { - return NULL; + ret = NULL; } else { - return (T*)((intptr_t)ptr + (intptr_t)offset); + ret = (T*)((intptr_t)ptr + (intptr_t)offset); } + return ret; } inline u8 JSULoNibble(u8 param_0) { return param_0 & 0x0f; } |
