glsl: Fix off-by-one error in array size check assertion
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 18 Nov 2015 02:35:00 +0000 (18:35 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 19 Nov 2015 02:35:56 +0000 (18:35 -0800)
commit2f554761536bbfd0d8ec22e807c18bd6df0f22b8
tree3a33ff50a2681a36a8ea1d7542f0e3448a58e70a
parent0aded03046a5dd73bedece767dea8559463a7a57
glsl: Fix off-by-one error in array size check assertion

Apparently, this has been a bug since 2010 (c30f6e5d).

Also use ARRAY_SIZE instead of open coding it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
src/glsl/ir.cpp