summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModLoading/Rewriters
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-09-02 21:24:10 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-09-02 21:24:10 -0400
commit169ce01810a66cbaaf793adaad1659809721336d (patch)
treee5f0cb202975a2942288838ec3557ecd01c7bc1b /src/SMAPI/Framework/ModLoading/Rewriters
parent0ce8939988159723851e4e64eeb82b026f982ef5 (diff)
downloadSMAPI-169ce01810a66cbaaf793adaad1659809721336d.tar.gz
SMAPI-169ce01810a66cbaaf793adaad1659809721336d.tar.bz2
SMAPI-169ce01810a66cbaaf793adaad1659809721336d.zip
fix build errors on Linux
Diffstat (limited to 'src/SMAPI/Framework/ModLoading/Rewriters')
-rw-r--r--src/SMAPI/Framework/ModLoading/Rewriters/HarmonyRewriter.cs2
1 files changed, 1 insertions, 1 deletions
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<TypeReference> 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