draw: More defensive coding in DRAW_GET_IDX.

Doesn't make a difference ATM, but just in case.
This commit is contained in:
José Fonseca 2013-05-15 16:59:28 +01:00
parent 1883e1d3e9
commit 2a43dfda95
1 changed files with 2 additions and 2 deletions

View File

@ -466,7 +466,7 @@ draw_get_rasterizer_no_cull( struct draw_context *draw,
* If the index buffer would overflow we return the
* index of the first element in the vb.
*/
#define DRAW_GET_IDX(elts, i) \
((i) >= draw->pt.user.eltMax) ? 0 : elts[i]
#define DRAW_GET_IDX(_elts, _i) \
(((_i) >= draw->pt.user.eltMax) ? 0 : (_elts)[_i])
#endif /* DRAW_PRIVATE_H */