diff --git a/game_re/binders/gh_auto_binder.h b/game_re/binders/gh_auto_binder.h index 9a01cb3c..0e5a32f3 100644 --- a/game_re/binders/gh_auto_binder.h +++ b/game_re/binders/gh_auto_binder.h @@ -37,7 +37,12 @@ template struct FieldBinder { } template T *operator=(T *src) { - return reinterpret_cast(dst) = src; + union V { + T *a; + void* b; + }; + V* trick = reinterpret_cast(this); + return trick->a = src; } ExpectedType& operator=(ExpectedType src) { return *reinterpret_cast(dst) = src; @@ -47,7 +52,7 @@ template struct FieldBinder { template inline FieldBinder operator+(const void *str, Field offset) { - return FieldBinder{.dst = (uint8_t *)str + offset}; + return FieldBinder{.dst = (uint8_t *)str + Offset}; } #endif /* B8D59B54_1674_4C0F_AA2C_611385FF5D03 */ diff --git a/game_re/binders/gh_base.h b/game_re/binders/gh_base.h index 2c1a6e71..92bfd085 100644 --- a/game_re/binders/gh_base.h +++ b/game_re/binders/gh_base.h @@ -43,8 +43,8 @@ typedef uint32_t cc_type_t; template -inline constexpr cc_type_t CONCAT12(T0 a, T1 b) { - return cc_type_t(a) << 16 | cc_type_t(b); +inline constexpr undefined3 CONCAT12(T0 a, T1 b) { + return undefined3(cc_type_t(a) << 16 | cc_type_t(b)); } template inline constexpr cc_type_t CONCAT11(T0 a, T1 b) {