Well, on my first attempt I was using Netbeans to create an empty text file which i added 10 words in for testing, and then on the second attempt I used the word list generated on unix.. Same results for both.. :(
Printable View
Sorry, but I don't quite follow. Are you on a linux/unix system? If so, you could use "od -x wordlist" to list it in hex format. If you have ANY "0d" characters in the file, then you have a file with DOS/Windows style newlines, which is not what linux/unix expects, so you will need to strip them.
Modifying your strip functionality like this would do:
Code:for (i=0; i<sizeof(words)/sizeof(words[0]); i++) {
char *p = strchr(words[i],'\n');
char *q = strchr(words[i],'\r');
if (q && q < p) p = q;
if(p) {
*p = '\0';
}
}
--
Mats