diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-10-16 15:12:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-16 15:12:17 -0400 |
commit | ff9a955c8bffbffc24549d17d7f74973ce4c764e (patch) | |
tree | ce258d3998039b7430d2beebf8cdf5856c2f71b2 /src/SMAPI | |
parent | e31c96d5b816caa9b0b9e950306b9292a87380d7 (diff) | |
parent | 72ee547e1e0eb502a90381b3c9f1da3a9c5f2b18 (diff) | |
download | SMAPI-ff9a955c8bffbffc24549d17d7f74973ce4c764e.tar.gz SMAPI-ff9a955c8bffbffc24549d17d7f74973ce4c764e.tar.bz2 SMAPI-ff9a955c8bffbffc24549d17d7f74973ce4c764e.zip |
Merge pull request #879 from atravita-mods/FixIndexingAgain
Fix image patching index math
Diffstat (limited to 'src/SMAPI')
-rw-r--r-- | src/SMAPI/Framework/Content/AssetDataForImage.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForImage.cs b/src/SMAPI/Framework/Content/AssetDataForImage.cs index 241c09a8..7c8cc6a8 100644 --- a/src/SMAPI/Framework/Content/AssetDataForImage.cs +++ b/src/SMAPI/Framework/Content/AssetDataForImage.cs @@ -192,7 +192,7 @@ namespace StardewModdingAPI.Framework.Content int topOffset = startIndex / sourceArea.Width; int bottomOffset = endIndex / sourceArea.Width; - targetArea = new(targetArea.X, targetArea.Y + topOffset, targetArea.Width, bottomOffset - topOffset + 1); + targetArea = new(targetArea.X, targetArea.Y + topOffset - startRow, targetArea.Width, bottomOffset - topOffset + 1); pixelCount = targetArea.Width * targetArea.Height; sourceOffset = topOffset * sourceArea.Width; } |