diff options
-rw-r--r-- | apps/plugins/matrix.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/matrix.c b/apps/plugins/matrix.c index 428dc093bf..087a501474 100644 --- a/apps/plugins/matrix.c +++ b/apps/plugins/matrix.c | |||
@@ -88,14 +88,14 @@ static void matrix_init(void) { | |||
88 | rb->srand(*rb->current_tick); | 88 | rb->srand(*rb->current_tick); |
89 | 89 | ||
90 | /* Make the matrix */ | 90 | /* Make the matrix */ |
91 | for (i = 0; i <= ROWS; i++) { | 91 | for (i = 0; i < ROWS; i++) { |
92 | for (j = 0; j <= COLS - 1; j++ ) { | 92 | for (j = 0; j < COLS; j++) { |
93 | matrix[i][j].val = -1; | 93 | matrix[i][j].val = -1; |
94 | matrix[i][j].bold = 0; | 94 | matrix[i][j].bold = 0; |
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
98 | for (j = 0; j <= COLS - 1; j++) { | 98 | for (j = 0; j < COLS; j++) { |
99 | /* Set up spaces[] array of how many spaces to skip */ | 99 | /* Set up spaces[] array of how many spaces to skip */ |
100 | spaces[j] = rb->rand() % ROWS + 1; | 100 | spaces[j] = rb->rand() % ROWS + 1; |
101 | 101 | ||
@@ -139,7 +139,7 @@ static void matrix_loop(void) | |||
139 | if (count > 4) | 139 | if (count > 4) |
140 | count = 1; | 140 | count = 1; |
141 | 141 | ||
142 | for (j = 0; j <= COLS - 1; j++) { | 142 | for (j = 0; j < COLS; j++) { |
143 | if (count > updates[j]) { | 143 | if (count > updates[j]) { |
144 | /* New style scrolling */ | 144 | /* New style scrolling */ |
145 | if (matrix[0][j].val == -1 && matrix[1][j].val == 129 | 145 | if (matrix[0][j].val == -1 && matrix[1][j].val == 129 |
@@ -217,7 +217,7 @@ static void matrix_loop(void) | |||
217 | firstcoldone = 1; | 217 | firstcoldone = 1; |
218 | i++; | 218 | i++; |
219 | } | 219 | } |
220 | for (i = 1; i <= ROWS; i++) { | 220 | for (i = 1; i < ROWS; i++) { |
221 | if (matrix[i][j].val == 0 || matrix[i][j].bold == 2) { | 221 | if (matrix[i][j].val == 0 || matrix[i][j].bold == 2) { |
222 | if (matrix[i][j].val == 0) | 222 | if (matrix[i][j].val == 0) |
223 | matrix_blit_char(i - 1, j, 20); | 223 | matrix_blit_char(i - 1, j, 20); |