Index = 1, always

you can add a test to see of the strlen() of str is 8

isn't NUMBEROFPASSWORDS the max size of the array? nPassword is the number of passwords read