We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 528687a commit 9793d2fCopy full SHA for 9793d2f
csharp-api/REFrameworkNET/Field.cpp
@@ -48,7 +48,7 @@ namespace REFrameworkNET {
48
return;
49
}
50
51
- const auto field_type = this->GetType();
+ auto field_type = this->GetType();
52
53
if (field_type == nullptr) {
54
@@ -92,8 +92,14 @@ namespace REFrameworkNET {
92
return; // Don't think there's any other way to set a reference type
93
94
95
+ auto underlying_type = field_type->GetUnderlyingType();
96
+
97
+ // For enums
98
+ if (underlying_type != nullptr) {
99
+ field_type = underlying_type;
100
+ }
101
102
const uintptr_t addr = IsStatic() ? 0 : obj;
- const auto vm_obj_type = field_type->GetVMObjType();
103
104
#define MAKE_TYPE_HANDLER_SET(X, Y) \
105
case ##X##_fnv: \
0 commit comments