Update main.c

Fixed that weird for-loop. Stared at it for fucking 30 minutes thinking I was going insane...