From 84a04309ef0213cdabc5e5ff7271a69426276dac Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 22 Dec 2010 14:14:30 +0100 Subject: [PATCH] Changed: #1219 Bad color when rgba.cpp is compiled with GCC 4.2.4 --- code/nel/src/misc/rgba.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/nel/src/misc/rgba.cpp b/code/nel/src/misc/rgba.cpp index dd8501270..4746d4f56 100644 --- a/code/nel/src/misc/rgba.cpp +++ b/code/nel/src/misc/rgba.cpp @@ -646,6 +646,11 @@ bool CRGBA::convertToHLS(float &h, float &l, float &s) const { h = 4.f + (r - g) / diff; } + else + { + // this case is to fix a compiler bug + h = (g - b) / diff; + } h *= 60.f; // scale to [0..360]