Change signedness of some GEM resource fields, corrects working with >=32KiB resources.

This commit is contained in:
2018-03-02 13:34:04 +00:00
parent 66e4b9101d
commit 179a4e80a8
5 changed files with 133 additions and 133 deletions

View File

@@ -67,7 +67,7 @@ namespace exeinfogui.GEM
byte[] data = new byte[node.BitBlock.Data.Length];
int pos = 0;
int w = node.BitBlock.Width / 8;
int w = (int)(node.BitBlock.Width / 8);
// This flips the image.
while(pos < data.Length)
{
@@ -91,7 +91,7 @@ namespace exeinfogui.GEM
for(int i = 0; i < 8; i++)
pixels.Add((b & (1 << i)) != 0 ? color : background);
return new Bitmap(node.BitBlock.Width, node.BitBlock.Height, PixelFormat.Format32bppRgb, pixels);
return new Bitmap((int)node.BitBlock.Width, (int)node.BitBlock.Height, PixelFormat.Format32bppRgb, pixels);
}
}
}