radeon: Fix loop en condition so debug output doesn't flood meaningless values.
authorPauli Nieminen <suokkos@gmail.com>
Wed, 26 Aug 2009 21:07:05 +0000 (00:07 +0300)
committerPauli Nieminen <suokkos@gmail.com>
Wed, 26 Aug 2009 21:07:05 +0000 (00:07 +0300)
src/mesa/drivers/dri/radeon/radeon_common.c

index 9b301cd47c656d040b8523fdf74c1c0ffc52f209..0894372fad1e6c4b672b06a34182dfecea62b5c1 100644 (file)
@@ -952,7 +952,7 @@ static void radeon_print_state_atom(radeonContextPtr radeon, struct radeon_state
        if (DEBUG_CMDBUF > 1 && RADEON_DEBUG & DEBUG_VERBOSE) {
                if (dwords > state->cmd_size)
                        dwords = state->cmd_size;
-               for (i = 0; i < state->cmd_size;) {
+               for (i = 0; i < dwords;) {
                        packet0 = state->cmd[i];
                        reg = (packet0 & 0x1FFF) << 2;
                        count = ((packet0 & 0x3FFF0000) >> 16) + 1;