Code

handle unhandled case in sp_color_rgb_to hsv_floatv(), removes assert warnings when...
authorrwst <rwst@users.sourceforge.net>
Sun, 21 May 2006 09:03:45 +0000 (09:03 +0000)
committerrwst <rwst@users.sourceforge.net>
Sun, 21 May 2006 09:03:45 +0000 (09:03 +0000)
src/color.cpp

index 77fca3b4b338140b09cad3e8696f8fe16dc07acd..4c64d84cd1c0a23120dcf613ff9e13f0c77703e7 100644 (file)
@@ -290,6 +290,8 @@ sp_color_rgb_to_hsv_floatv (float *hsv, float r, float g, float b)
 
         if (hsv[0] < 0) hsv[0] += 1.0;
     }
+    else 
+        hsv[0] = 0.0;
 }
 
 /**