diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2005-11-24 03:48:19 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2005-11-24 03:48:19 +0000 |
commit | b1abf1ea8e4cad0f574b059149cb9761f12c4053 (patch) | |
tree | 698ecd124df8e1b607a3fa57525eb0ebdb24fbf3 /src/egl | |
parent | ff707ead2b6453d24942ce1a1b3a41ce281b5b50 (diff) |
change error test in _eglParseConfigAttribs()
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/main/eglconfig.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index ab141dc128..eba608b0ba 100644 --- a/src/egl/main/eglconfig.c +++ b/src/egl/main/eglconfig.c @@ -153,8 +153,11 @@ _eglParseConfigAttribs(_EGLConfig *config, const EGLint *attrib_list) } for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) { - EGLint k = attrib_list[i] - FIRST_ATTRIB; - if (k >= 0 && k < MAX_ATTRIBS) { + if (attrib_list[i] >= EGL_BUFFER_SIZE && + attrib_list[i] <= EGL_MAX_SWAP_INTERVAL) { + EGLint k = attrib_list[i] - FIRST_ATTRIB; + assert(k >= 0); + assert(k < MAX_ATTRIBS); config->Attrib[k] = attrib_list[++i]; } else { |