(#) only at the beginning of the line, but they can appear anywhere.
This fix uses strtok() to terminate the buffer at the first comment
character.
/*
- * $Id: tools.cc,v 1.236 2003/04/29 16:08:19 hno Exp $
+ * $Id: tools.cc,v 1.237 2003/06/23 00:41:31 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
wordlist *hosts = NULL;
char *addr;
- if (buf[0] == '#') /* MS-windows likes to add comments */
- continue;
+ strtok(buf, "#"); /* chop everything following a comment marker */
lt = buf;