From 26b4c1ef54170f93b79240ad09594e03a8458c1e Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" <destructionator@gmail.com> Date: Tue, 14 Jun 2016 17:19:37 -0400 Subject: [PATCH] wrong bounds check --- color.d | 1 - 1 file changed, 1 deletion(-) diff --git a/color.d b/color.d index 0a34b03..9759ccd 100644 --- a/color.d +++ b/color.d @@ -925,7 +925,6 @@ class TrueColorImage : MemoryImage { override Color getPixel(int x, int y) const @trusted { if (x >= 0 && y >= 0 && x < _width && y < _height) { uint pos = y*_width+x; - if (pos+3 >= imageData.bytes.length/4) return Color(0, 0, 0, 0); return imageData.colors.ptr[pos]; } else { return Color(0, 0, 0, 0);