projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'development'
[NeonServV5.git]
/
src
/
ConfigParser.c
diff --git
a/src/ConfigParser.c
b/src/ConfigParser.c
index bbf479131800b177e0331cc9828f4c4791057d89..050d6b48d77fbc11fe6a328df76eb5ce0861393c 100644
(file)
--- 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
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
@@
-16,6
+16,7
@@
*/
#include "ConfigParser.h"
*/
#include "ConfigParser.h"
+#include "tools.h"
#define ENTRYTYPE_BLOCK 1
#define ENTRYTYPE_STRING 2
#define ENTRYTYPE_BLOCK 1
#define ENTRYTYPE_STRING 2
@@
-156,9
+157,15
@@
static char *parse_config_recursive(struct ConfigEntry *centry, char *buffer, in
}
if(flags & PARSER_FLAG_COMMAND) {
int found_command = 0;
}
if(flags & PARSER_FLAG_COMMAND) {
int found_command = 0;
+ char *tmp_buffer;
switch(*buffer) {
case '/':
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 '*':
found_command = 1;
break;
case '*':