projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1883e1d
)
draw: More defensive coding in DRAW_GET_IDX.
author
José Fonseca
<jfonseca@vmware.com>
Wed, 15 May 2013 15:59:28 +0000
(16:59 +0100)
committer
José Fonseca
<jfonseca@vmware.com>
Wed, 15 May 2013 15:59:28 +0000
(16:59 +0100)
Doesn't make a difference ATM, but just in case.
src/gallium/auxiliary/draw/draw_private.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/draw/draw_private.h
b/src/gallium/auxiliary/draw/draw_private.h
index 44698db93d0c6c9302b56a70eab09993339b96eb..1b2d55fac556f3fd42ba6828fe9422a5786934c4 100644
(file)
--- a/
src/gallium/auxiliary/draw/draw_private.h
+++ b/
src/gallium/auxiliary/draw/draw_private.h
@@
-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 */