Skip indentation and comments in io_extract_data()

We actually only use this function to parse configuration data.
Currently, this probably is the best way to do some common
preprocessing.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-07-15 18:08:58 +02:00
parent 5f24132d18
commit b362c17daa

View File

@ -806,9 +806,10 @@ io_extract_data (char *dst_data, const char *org, int len)
{ {
int i; int i;
for (; *org == ' ' || *org == '\t'; org++);
for (i = 0; i < len - 1; i++) for (i = 0; i < len - 1; i++)
{ {
if (*org == '\n' || *org == '\0') if (*org == '\n' || *org == '\0' || *org == '#')
break; break;
*dst_data++ = *org++; *dst_data++ = *org++;
} }