summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-02-06 20:47:57 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-02-07 22:44:31 -0500
commit6b6ccb87de4d669f66e0c1a5b9270607db16484c (patch)
tree2e2d67ce5f2e285d246f74d4a904a0dea822ffc1 /src
parent1d25edc2a5a81b52c8de8ce98725de6705e8bbb3 (diff)
downloadSMAPI-6b6ccb87de4d669f66e0c1a5b9270607db16484c.tar.gz
SMAPI-6b6ccb87de4d669f66e0c1a5b9270607db16484c.tar.bz2
SMAPI-6b6ccb87de4d669f66e0c1a5b9270607db16484c.zip
fix error with custom map tilesheets in some cases
Specifically, when a custom map has a seasonal tilesheet which only exists the Content/Maps folder and already matches the current season.
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI/Framework/ModHelpers/ContentHelper.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs
index dac627ba..7c353003 100644
--- a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs
@@ -319,7 +319,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
foreach (string candidateKey in new[] { imageSource, $@"Maps\{imageSource}" })
{
string contentKey = candidateKey.EndsWith(".png")
- ? candidateKey.Substring(0, imageSource.Length - 4)
+ ? candidateKey.Substring(0, candidateKey.Length - 4)
: candidateKey;
try