r200: Avoid out of bounds array access.
authorMatt Turner <mattst88@gmail.com>
Sun, 7 Dec 2014 07:04:53 +0000 (23:04 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 12 Dec 2014 20:11:31 +0000 (12:11 -0800)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/r200/r200_sanity.c

index dd3cf81755885b42f6c76dc59d598732bba4666a..34d83d89b3858e68b84052902e4711d1a28a5e58 100644 (file)
@@ -622,7 +622,7 @@ static void init_regs( void )
    struct reg_names *tmp;
    int i;
 
-   for (i = 0 ; i < Elements(regs) ; i++) {
+   for (i = 0 ; i < Elements(reg_names) ; i++) {
       regs[i].idx = reg_names[i].idx;
       regs[i].closest = &reg_names[i];
       regs[i].flags = 0;