Fixes an issue where non-blittable generic value types get unboxed when they shouldn't be during parameter loading.
The most notable example is adding a boxed integer into a dictionary, the value field would have invalid data written to it.
private unsafe void Test() {
long testLong = 2137;
var testInt64 = new Il2CppSystem.Int64();
*&testInt64.m_value = testLong;
var dictionary = new Il2CppSystem.Collections.Generic.Dictionary<string, Il2CppSystem.Object>();
dictionary.Add("test", testInt64.BoxIl2CppObject()); // PREV: Writes invalid data to value field
foreach (var kv in dictionary)
{
Log.LogInfo(kv.Key); // "test"
Log.LogInfo(kv.Value); // 2137 (PREV: crash on access)
}
}
Fixes an issue where non-blittable generic value types get unboxed when they shouldn't be during parameter loading.
The most notable example is adding a boxed integer into a dictionary, the value field would have invalid data written to it.