Skip to content

Commit dcf86dc

Browse files
author
Elliot Williams
committed
fixed buffer-length bug in 1up.c
Thanks Andy Dalton!
1 parent c275d50 commit dcf86dc

File tree

1 file changed

+1
-1
lines changed
  • Chapter03_Digital-Output/povToy

1 file changed

+1
-1
lines changed

Chapter03_Digital-Output/povToy/1up.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ int main(void) {
4545
DDRB = 0xff; /* all output */
4646

4747
while (1) { /* mainloop */
48-
for (i = 0; i <= sizeof(Star1UP); ++i) {
48+
for (i = 0; i < sizeof(Star1UP); i++) {
4949
/* sizeof(Star1UP) returns the number of bits in our array, */
5050
PORTB = Star1UP[i];
5151
_delay_ms(DELAYTIME);

0 commit comments

Comments
 (0)