From 72ee547e1e0eb502a90381b3c9f1da3a9c5f2b18 Mon Sep 17 00:00:00 2001 From: atravita-mods <94934860+atravita-mods@users.noreply.github.com> Date: Sat, 15 Oct 2022 11:03:39 -0400 Subject: [PATCH] And fixing the indexing math again. --- src/SMAPI/Framework/Content/AssetDataForImage.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }