Browse Source

Added proper AllowNull handling for corrected members

pull/46/head
Anairkoen Schno 4 years ago
parent
commit
40f83aec73
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      IPA.Loader/Config/Stores/GeneratedStoreImpl/Correction.cs

+ 5
- 0
IPA.Loader/Config/Stores/GeneratedStoreImpl/Correction.cs View File

@ -61,6 +61,11 @@ namespace IPA.Config.Stores
var noCreate = il.DefineLabel();
var valLocal = GetLocal(convType);
if (member.AllowNull)
{
il.Emit(OpCodes.Dup);
il.Emit(OpCodes.Brfalse_S, endLabel); // thing is null, just bypass it all
}
if (!alwaysNew)
{
il.Emit(OpCodes.Dup);


Loading…
Cancel
Save