diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-05-27 00:44:26 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2020-05-27 00:44:26 -0400 |
commit | 01b6e4ac3252a3ac8aa8046b5b97000fce13d576 (patch) | |
tree | 5facaf176b03e991057f594e9709da380d788ed8 /src | |
parent | d9c2d242b9457a6517ec348c945ae1a324582492 (diff) | |
download | SMAPI-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.cs | 2 |
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}"); |