| commit | 5cb203433ab5c4e54a7386a816263a237c716aa2 | [log] [tgz] |
|---|---|---|
| author | Brian <brian.paul@tungstengraphics.com> | Wed Oct 31 09:38:51 2007 -0600 |
| committer | Brian <brian.paul@tungstengraphics.com> | Wed Oct 31 09:57:47 2007 -0600 |
| tree | 3c0d1520f2df732899b969a7f239942df3406480 | |
| parent | d2f19a554a9089fddb5e978e3a732bbf71d77f93 [diff] [blame] |
check for count==0 in _mesa_validate_DrawArrays()
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index e2eebcc..74b0912 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c
@@ -247,8 +247,9 @@ { ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (count < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" ); + if (count <= 0) { + if (count < 0) + _mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" ); return GL_FALSE; }