diff options
author | atravita-mods <94934860+atravita-mods@users.noreply.github.com> | 2022-11-14 11:38:10 -0500 |
---|---|---|
committer | atravita-mods <94934860+atravita-mods@users.noreply.github.com> | 2022-11-14 11:38:10 -0500 |
commit | e2c1d2b1c9ff03853e77faf6d36b2a27f219b488 (patch) | |
tree | 14434abad1ae566fd1e4c88e3c35772dccfe0eac /src/SMAPI/Framework/Content | |
parent | 72f5df2d207481b4d83ea34379ef0dada86ff8fc (diff) | |
download | SMAPI-e2c1d2b1c9ff03853e77faf6d36b2a27f219b488.tar.gz SMAPI-e2c1d2b1c9ff03853e77faf6d36b2a27f219b488.tar.bz2 SMAPI-e2c1d2b1c9ff03853e77faf6d36b2a27f219b488.zip |
more indexing errors joy
Diffstat (limited to 'src/SMAPI/Framework/Content')
-rw-r--r-- | src/SMAPI/Framework/Content/AssetDataForImage.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForImage.cs b/src/SMAPI/Framework/Content/AssetDataForImage.cs index 7c8cc6a8..5832570b 100644 --- a/src/SMAPI/Framework/Content/AssetDataForImage.cs +++ b/src/SMAPI/Framework/Content/AssetDataForImage.cs @@ -163,7 +163,8 @@ namespace StardewModdingAPI.Framework.Content int startIndex = -1; int endIndex = -1; { - for (int i = startRow * sourceArea.Width; i < pixelCount; i++) + int endPixel = pixelCount + startRow * sourceArea.Width; + for (int i = startRow * sourceArea.Width; i < endPixel; i++) { if (sourceData[i].A >= AssetDataForImage.MinOpacity) { @@ -174,7 +175,7 @@ namespace StardewModdingAPI.Framework.Content if (startIndex == -1) return; // blank texture - for (int i = startRow * sourceArea.Width + pixelCount - 1; i >= startIndex; i--) + for (int i = endPixel - 1; i >= startIndex; i--) { if (sourceData[i].A >= AssetDataForImage.MinOpacity) { |