And fixing the indexing math again.

This commit is contained in:
atravita-mods 2022-10-15 11:03:39 -04:00
parent ce00f8ff87
commit 72ee547e1e
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ namespace StardewModdingAPI.Framework.Content
int topOffset = startIndex / sourceArea.Width; int topOffset = startIndex / sourceArea.Width;
int bottomOffset = endIndex / 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; pixelCount = targetArea.Width * targetArea.Height;
sourceOffset = topOffset * sourceArea.Width; sourceOffset = topOffset * sourceArea.Width;
} }