| ??? 03/01/10 11:03 Modified: 03/01/10 11:08 Read: times |
#173678 - Woops. Responding to: ???'s previous message |
//if user inputted password is not equal to the saved password then it's incorrect
if (password[cnt2] != passINP[cnt2]); <- This semicolon is erroneous...my bad guys!
{
flag = 0;
}
UGH That semicolon! Bugger I didn't notice the semicolon, was half asleep while writing the code. Probably would have worked if the semicolon wasn't there. Keep in mind that the scope of that code (although I didn't deem it necessary to insert a larger code snippet) was to compare each element of both char arrays to each other, which if I recall well can be done in plain old fashioned C. Still the string compare command as per suggestions resulted in a shorter code, hence a more elegant solution. Thanks for pointing that out! Actually now I feel a little bit stupid for not having noticed such a 'newb' error haha Kai |
| Topic | Author | Date |
| Question about KEIL | 01/01/70 00:00 | |
| It ain't how i would do it | 01/01/70 00:00 | |
| Thank you! | 01/01/70 00:00 | |
| using strncmp for a password check is a bug :^) | 01/01/70 00:00 | |
| Yeah whatever | 01/01/70 00:00 | |
| Interesting | 01/01/70 00:00 | |
| Eh?? | 01/01/70 00:00 | |
40 instead of 50000000 | 01/01/70 00:00 | |
| Nothing to do with Keil | 01/01/70 00:00 | |
| Hmmm I see | 01/01/70 00:00 | |
| Problem solved! | 01/01/70 00:00 | |
| Do you undrestand why it did not work? | 01/01/70 00:00 | |
| Wrong | 01/01/70 00:00 | |
| Yes, it's wrong - but... | 01/01/70 00:00 | |
| code size decrease | 01/01/70 00:00 | |
| Maybe | 01/01/70 00:00 | |
| After a nights sleep | 01/01/70 00:00 | |
| Where it gets specific to Keil (or whatever) | 01/01/70 00:00 | |
| Explain | 01/01/70 00:00 | |
| Woops. | 01/01/70 00:00 | |
| such a 'newb' error (sic) | 01/01/70 00:00 | |
| Password application | 01/01/70 00:00 |



