From 25334a31cc2eb5aed8af93ef514afee0c6d31df6 Mon Sep 17 00:00:00 2001 From: Orange Borg Date: Wed, 1 Apr 2015 11:43:47 +1300 Subject: [PATCH] Avoid infinite loop in getFlatIcon Since I did it on tg anyway --- code/__HELPERS/icons.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 34fdfdc3ae2..3466ec36e95 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -107,7 +107,7 @@ AngleToHue(hue) Converts an angle to a hue in the valid range. RotateHue(hsv, angle) Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360. - (Rotating red by 60° produces yellow.) The result is another HSV or HSVA color with the same saturation and value + (Rotating red by 60° produces yellow.) The result is another HSV or HSVA color with the same saturation and value as the original, but a different hue. GrayScale(rgb) Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string. @@ -699,7 +699,9 @@ proc // Creates a single icon from a given /atom or /image. Only the first argu while(TRUE) if(curIndex<=process.len) current = process[curIndex] - if(!current) continue + if(!current) + curIndex++ //Skip this bad layer item + continue currentLayer = current:layer if(currentLayer<0) // Special case for FLY_LAYER if(currentLayer <= -1000) return flat