Browse Source

* config.c : better detection of comments at end of line

master
Alex 'AdUser' Z 8 years ago
parent
commit
6ee6c1fd90
  1. 6
      src/config.c

6
src/config.c

@ -33,8 +33,10 @@ f2b_config_parse_kv_pair(const char *src) {
value++;
/* strip trailing comment */
if ((p = strstr(value, " #")) || (p = strstr(value, "\t#")))
*p = '\0';
if ((p = strstr(value, " #")) != NULL) *p = '\0';
if ((p = strstr(value, "\t#")) != NULL) *p = '\0';
if ((p = strstr(value, " ;")) != NULL) *p = '\0';
if ((p = strstr(value, "\t;")) != NULL) *p = '\0';
/* strip trailing spaces */
p = value + strlen(value);

Loading…
Cancel
Save