X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FConfigParser.c;h=5d32afccb2811127ae05d8a1278c770e5c9702d6;hp=bbf479131800b177e0331cc9828f4c4791057d89;hb=a40e0df080a82db2b1150492a8952cdfe3559185;hpb=902ebfe5551be2daa3edf8141bcee91f62c0a5e0 diff --git a/src/ConfigParser.c b/src/ConfigParser.c index bbf4791..5d32afc 100644 --- a/src/ConfigParser.c +++ b/src/ConfigParser.c @@ -1,4 +1,4 @@ -/* ConfigParser.c - NeonServ v5.3 +/* ConfigParser.c - NeonServ v5.6 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -156,9 +156,15 @@ static char *parse_config_recursive(struct ConfigEntry *centry, char *buffer, in } if(flags & PARSER_FLAG_COMMAND) { int found_command = 0; + char *tmp_buffer; switch(*buffer) { case '/': - buffer = strstr(buffer, "\n"); + tmp_buffer = buffer; + buffer = strchr(buffer, '\r'); + if(!buffer) + buffer = strchr(tmp_buffer, '\n'); + if(!buffer) + buffer = tmp_buffer + strlen(tmp_buffer)-1; found_command = 1; break; case '*':