png bug fix?

This commit is contained in:
Adam D. Ruppe 2016-06-20 20:31:55 -04:00
parent ed23f6a91e
commit 9942a07f70
1 changed files with 1 additions and 0 deletions

1
png.d
View File

@ -1809,6 +1809,7 @@ immutable(ubyte)[] unfilter(ubyte filterType, in ubyte[] data, in ubyte[] previo
return assumeUnique(arr);
case 3:
auto arr = data.dup;
if(previousLine.length)
foreach(i; 0 .. arr.length) {
auto prev = i < bpp ? 0 : arr[i - bpp];
arr[i] += cast(ubyte)