From 169ce01810a66cbaaf793adaad1659809721336d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 2 Sep 2021 21:24:10 -0400 Subject: fix build errors on Linux --- src/SMAPI/Framework/ModLoading/Rewriters/HarmonyRewriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SMAPI/Framework/ModLoading/Rewriters') diff --git a/src/SMAPI/Framework/ModLoading/Rewriters/HarmonyRewriter.cs b/src/SMAPI/Framework/ModLoading/Rewriters/HarmonyRewriter.cs index 38ab3d80..922d4bc4 100644 --- a/src/SMAPI/Framework/ModLoading/Rewriters/HarmonyRewriter.cs +++ b/src/SMAPI/Framework/ModLoading/Rewriters/HarmonyRewriter.cs @@ -34,7 +34,7 @@ namespace StardewModdingAPI.Framework.ModLoading.Rewriters public override bool Handle(ModuleDefinition module, TypeReference type, Action replaceWith) { // detect Harmony - if (type.Scope is not AssemblyNameReference { Name: "0Harmony" } scope) + if (!(type.Scope is AssemblyNameReference scope) || scope.Name != "0Harmony") return false; // rewrite Harmony 1.x type to Harmony 2.0 type -- cgit