(svn r21687) -Fix: verify the colour code we received from the server is valid

This commit is contained in:
smatz
2011-01-01 17:02:29 +00:00
parent c0471356ba
commit fee10eeb18
2 changed files with 10 additions and 3 deletions

View File

@@ -30,4 +30,10 @@ enum ConsoleColour {
CC_WHITE = 12,
};
static inline bool IsValidConsoleColour(uint c)
{
return c == CC_DEFAULT || c == CC_ERROR || c == CC_WARNING || c == CC_INFO ||
c == CC_DEBUG || c == CC_COMMAND || c == CC_WHITE;
}
#endif /* CONSOLE_TYPE_H */