diff options
author | atravita-mods <94934860+atravita-mods@users.noreply.github.com> | 2022-10-15 11:03:39 -0400 |
---|---|---|
committer | atravita-mods <94934860+atravita-mods@users.noreply.github.com> | 2022-10-15 11:03:39 -0400 |
commit | 72ee547e1e0eb502a90381b3c9f1da3a9c5f2b18 (patch) | |
tree | 4224b358e03eb81cc5055fb2f31e96dce9bbde05 /src/SMAPI/Framework/Content | |
parent | ce00f8ff878860f2476a962b60ec2d8b3b5b2a2e (diff) | |
download | SMAPI-72ee547e1e0eb502a90381b3c9f1da3a9c5f2b18.tar.gz SMAPI-72ee547e1e0eb502a90381b3c9f1da3a9c5f2b18.tar.bz2 SMAPI-72ee547e1e0eb502a90381b3c9f1da3a9c5f2b18.zip |
And fixing the indexing math again.
Diffstat (limited to 'src/SMAPI/Framework/Content')
-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; } |