diff options
author | smatz <smatz@openttd.org> | 2013-01-14 21:16:56 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2013-01-14 21:16:56 +0000 |
commit | 3a3162865b3174bddcc295fd4bd4eb5398a50ea5 (patch) | |
tree | aa526d8634c2addc8a92e7bfb2a1a81378212993 /src/widget.cpp | |
parent | 914bb708ad1558a10112e1001381d90348e82690 (diff) | |
download | openttd-3a3162865b3174bddcc295fd4bd4eb5398a50ea5.tar.xz |
(svn r24915) -Fix: Several out-of-bounds reads
Diffstat (limited to 'src/widget.cpp')
-rw-r--r-- | src/widget.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widget.cpp b/src/widget.cpp index fc6b88101..c3f9eca29 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -175,6 +175,8 @@ int GetWidgetFromPos(const Window *w, int x, int y) */ void DrawFrameRect(int left, int top, int right, int bottom, Colours colour, FrameFlags flags) { + assert(colour < COLOUR_END); + uint dark = _colour_gradient[colour][3]; uint medium_dark = _colour_gradient[colour][5]; uint medium_light = _colour_gradient[colour][6]; |