fix types getting rewritten unnecessarily if the source & target types have the same full name (#556)
This commit is contained in:
parent
3463ee806c
commit
96a8401c03
|
@ -92,7 +92,7 @@ namespace StardewModdingAPI.Framework.ModLoading.Rewriters
|
||||||
/// <param name="platformChanged">Whether the mod was compiled on a different platform.</param>
|
/// <param name="platformChanged">Whether the mod was compiled on a different platform.</param>
|
||||||
public override InstructionHandleResult Handle(ModuleDefinition module, ILProcessor cil, Instruction instruction, PlatformAssemblyMap assemblyMap, bool platformChanged)
|
public override InstructionHandleResult Handle(ModuleDefinition module, ILProcessor cil, Instruction instruction, PlatformAssemblyMap assemblyMap, bool platformChanged)
|
||||||
{
|
{
|
||||||
if (!this.IsMatch(instruction) && !instruction.ToString().Contains(this.FromTypeName))
|
if (!this.IsMatch(instruction))
|
||||||
return InstructionHandleResult.None;
|
return InstructionHandleResult.None;
|
||||||
|
|
||||||
// field reference
|
// field reference
|
||||||
|
|
Loading…
Reference in New Issue