projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7659d1
)
assert that the vector for Color constructor is long enough
author
Matthias Braun
<matze@braunis.de>
Wed, 9 Aug 2006 16:28:09 +0000
(16:28 +0000)
committer
Matthias Braun
<matze@braunis.de>
Wed, 9 Aug 2006 16:28:09 +0000
(16:28 +0000)
SVN-Revision: 4140
src/video/color.hpp
patch
|
blob
|
history
diff --git
a/src/video/color.hpp
b/src/video/color.hpp
index
1178fab
..
391c929
100644
(file)
--- a/
src/video/color.hpp
+++ b/
src/video/color.hpp
@@
-21,6
+21,7
@@
#define __COLOR_HPP__
#include <vector>
+#include <assert.h>
#include "log.hpp"
class Color
@@
-38,6
+39,7
@@
public:
}
Color(const std::vector<float>& vals)
{
+ assert(vals.size() >= 3);
red = vals[0];
green = vals[1];
blue = vals[2];