From 91ab1e69585fbfa62a2473eb1337077850efbb1d Mon Sep 17 00:00:00 2001
From: Ansgar Philippsen <ansgar.philippsen@gmail.com>
Date: Wed, 8 Aug 2012 10:51:38 -0400
Subject: [PATCH] fixed a small bug in gradient

---
 modules/gfx/src/gradient.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gfx/src/gradient.cc b/modules/gfx/src/gradient.cc
index c65261b16..f1c93ffbb 100644
--- a/modules/gfx/src/gradient.cc
+++ b/modules/gfx/src/gradient.cc
@@ -70,7 +70,7 @@ Color Gradient::GetColorAt(float t) const
   }
   
   uint c=0;
-  while (t>=stops_[c].t && c<stops_.size()) {
+  while (c<stops_.size() && t>=stops_[c].t) {
     ++c;
   }
   if (c==0) {
-- 
GitLab