Fix Png parsing.

A regression from 06df75ffee causes this parsing to fail depending on how the image was compressed.
This commit is contained in:
RoosterDragon
2023-06-12 18:32:58 +01:00
committed by Matthias Mailänder
parent 0369f7516d
commit 4f3d8f4caa

View File

@@ -137,7 +137,7 @@ namespace OpenRA.FileFormats
var pxStride = PixelStride;
var rowStride = Width * pxStride;
var prevLine = Span<byte>.Empty;
Span<byte> prevLine = new byte[rowStride];
for (var y = 0; y < Height; y++)
{
var filter = (PngFilter)ds.ReadUInt8();