From 5ec62230651bbaedd27a72f2f9a2c524feef9b6a Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Tue, 12 Jun 2012 20:18:45 +0100 Subject: [PATCH] TPT: Check fire colour values are with the correct range --- src/Renderer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Renderer.cpp b/src/Renderer.cpp index 63746c9cd..53727aefe 100644 --- a/src/Renderer.cpp +++ b/src/Renderer.cpp @@ -955,6 +955,15 @@ void Renderer::render_parts() else if(colb<0) colb = 0; if(cola>255) cola = 255; else if(cola<0) cola = 0; + + if(firer>255) firer = 255; + else if(firer<0) firer = 0; + if(fireg>255) fireg = 255; + else if(fireg<0) fireg = 0; + if(fireb>255) fireb = 255; + else if(fireb<0) fireb = 0; + if(firea>255) firea = 255; + else if(firea<0) firea = 0; #endif //Pixel rendering