Merge branch 'master' of swgilluminati.com:DarthArgus/src

This commit is contained in:
DarthArgus
2014-10-27 19:00:24 -07:00
4 changed files with 45 additions and 43 deletions
@@ -367,26 +367,27 @@ char buffer[1024];
x = 0;
while(!feof(fp))
{
fgets( buffer, 1023, fp);
if (fgets( buffer, 1023, fp) != NULL) {
// get rid of '\n' and '\r' for comparisons
strtok(buffer,"\r\n");
len = strlen(buffer);
if( len > 0 )
{
if( nline == 0 )
// get rid of '\n' and '\r' for comparisons
strtok(buffer,"\r\n");
len = strlen(buffer);
if( len > 0 )
{
passString = (char *)malloc( len + 1 );
strcpy(passString,buffer);
}
else
{
allowedAddressList[x] = (char *)malloc( len + 1 );
strcpy(allowedAddressList[x],buffer);
x++;
if( nline == 0 )
{
passString = (char *)malloc( len + 1 );
strcpy(passString,buffer);
}
else
{
allowedAddressList[x] = (char *)malloc( len + 1 );
strcpy(allowedAddressList[x],buffer);
x++;
}
}
nline++;
}
nline++;
}
// clean up