Browse Source

Fixed bug in linear gradients where targetPointer did not compensate for starting on the second row.

David Piuva 2 years ago
parent
commit
257360198b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/DFPSR/machine/mediaFilters.cpp

+ 1 - 1
Source/DFPSR/machine/mediaFilters.cpp

@@ -354,8 +354,8 @@ void dsr::media_fade_region_linear(ImageU8& targetImage, const IRect& viewport,
 			}
 			// Copy the rest from the first line.
 			for (int32_t y = viewport.top() + 1; y < viewport.bottom(); y++) {
-				safeMemoryCopy<uint8_t>(targetRow, sourceRow, widthInBytes);
 				targetRow.increaseBytes(targetStride);
+				safeMemoryCopy<uint8_t>(targetRow, sourceRow, widthInBytes);
 			}
 		} else {
 			// Each pixel needs to be evaluated in this fade.