summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-05-27 00:44:26 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-05-27 00:44:26 -0400
commit01b6e4ac3252a3ac8aa8046b5b97000fce13d576 (patch)
tree5facaf176b03e991057f594e9709da380d788ed8 /src
parentd9c2d242b9457a6517ec348c945ae1a324582492 (diff)
downloadSMAPI-01b6e4ac3252a3ac8aa8046b5b97000fce13d576.tar.gz
SMAPI-01b6e4ac3252a3ac8aa8046b5b97000fce13d576.tar.bz2
SMAPI-01b6e4ac3252a3ac8aa8046b5b97000fce13d576.zip
fix BadImageFormatException error handling
Thanks to mouse for pointing it out!
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Program.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs
index 715c8553..9438f11e 100644
--- a/src/SMAPI/Program.cs
+++ b/src/SMAPI/Program.cs
@@ -41,7 +41,7 @@ namespace StardewModdingAPI
Program.AssertGameVersion();
Program.Start(args);
}
- catch (BadImageFormatException ex) when (ex.FileName == "StardewValley")
+ catch (BadImageFormatException ex) when (ex.FileName == "StardewValley" || ex.FileName == "Stardew Valley") // NOTE: don't use StardewModdingAPI.Constants here, assembly resolution isn't hooked up at this point
{
string executableName = Program.GetExecutableAssemblyName();
Console.WriteLine($"SMAPI failed to initialize because your game's {executableName}.exe seems to be invalid.\nThis may be a pirated version which modified the executable in an incompatible way; if so, you can try a different download or buy a legitimate version.\n\nTechnical details:\n{ex}");