aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/render.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/render.c b/src/render.c
index bf6c0256..ba76b9e6 100644
--- a/src/render.c
+++ b/src/render.c
@@ -34,6 +34,7 @@
\
r = 0; g = 0; b = 0; \
\
+ if ( p < 0.0 ) p = 0.0; \
switch ( s ) { \
case 0 : { /* Black to blue */ \
r = 0; g = 0; b = p*255; \
@@ -72,6 +73,7 @@
#define RENDER_MONO \
float p; \
p = (float)val / (float)max; \
+ if ( p < 0.0 ) p = 0.0; \
r = 255.0*p; g = 255.0*p; b = 255.0*p;
/* NB This function is shared between render_get_image() and