coverity check bug fix going over end of array
authorDave Airlie <airliedfreedesktop.org>
Wed, 8 Mar 2006 05:44:07 +0000 (05:44 +0000)
committerDave Airlie <airliedfreedesktop.org>
Wed, 8 Mar 2006 05:44:07 +0000 (05:44 +0000)
src/mesa/drivers/dri/radeon/radeon_sanity.c

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