From: Matthias Braun Date: Wed, 9 Aug 2006 16:28:09 +0000 (+0000) Subject: assert that the vector for Color constructor is long enough X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5fce9cfaf7f90280e86e15b1595f111e645f7343;p=supertux.git assert that the vector for Color constructor is long enough SVN-Revision: 4140 --- diff --git a/src/video/color.hpp b/src/video/color.hpp index 1178fabe9..391c929d4 100644 --- a/src/video/color.hpp +++ b/src/video/color.hpp @@ -21,6 +21,7 @@ #define __COLOR_HPP__ #include +#include #include "log.hpp" class Color @@ -38,6 +39,7 @@ public: } Color(const std::vector& vals) { + assert(vals.size() >= 3); red = vals[0]; green = vals[1]; blue = vals[2];