Browse Source

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

master
Alex 'AdUser' Z 9 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++; value++;
/* strip trailing comment */ /* strip trailing comment */
if ((p = strstr(value, " #")) || (p = strstr(value, "\t#"))) if ((p = strstr(value, " #")) != NULL) *p = '\0';
*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 */ /* strip trailing spaces */
p = value + strlen(value); p = value + strlen(value);

Loading…
Cancel
Save