# HG changeset patch # User Jason Maltzen # Date 2019-11-02 13:07:31 # Node ID 6d98e459cb932e2796157e9eae51b795a43b8ee3 # Parent 16c6883138fd80e8951cadf280bf6ad93e42e2f4 Fix a bad y offset computation when scanning for the paint bench. diff --git a/ReactionRecorder.cs b/ReactionRecorder.cs --- a/ReactionRecorder.cs +++ b/ReactionRecorder.cs @@ -313,7 +313,7 @@ namespace DesertPaintLab bool result = true; - int solidUpperLeft = testPixelStart + (2 * y * stride) + (2 * x * 3); + int solidUpperLeft = testPixelStart + ((y+2) * stride) + ((x+2) * 3); int solidLowerLeft = testPixelStart + ((swatchHeight - 4) * stride); int solidUpperRight = testPixelStart + ((swatchWidth - 4) * 3); int solidLowerRight = solidLowerLeft + ((swatchWidth - 4) * 3);