summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/libconfig.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-11 16:15:57 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-11 16:15:57 +0300
commit497510b22278aafaa7dedb8a6c705e8cdd35e9db (patch)
tree77996eeb49ee99f5f66e0dbd34419a78f5796cb8 /3rdparty/libconfig/libconfig.c
parent6c0f05b05e9bf09f40df3e3fe7f768f7435abcec (diff)
parent56297f27e6fa37444d7ddfd5b3ae4348371ee155 (diff)
downloadhercules-497510b22278aafaa7dedb8a6c705e8cdd35e9db.tar.gz
hercules-497510b22278aafaa7dedb8a6c705e8cdd35e9db.tar.bz2
hercules-497510b22278aafaa7dedb8a6c705e8cdd35e9db.tar.xz
hercules-497510b22278aafaa7dedb8a6c705e8cdd35e9db.zip
Merge pull request #788 from MishimaHaruna/libconfig
Libconfig edits for mob_db.conf
Diffstat (limited to '3rdparty/libconfig/libconfig.c')
-rw-r--r--3rdparty/libconfig/libconfig.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/3rdparty/libconfig/libconfig.c b/3rdparty/libconfig/libconfig.c
index 358c415f5..8f2b3fb42 100644
--- a/3rdparty/libconfig/libconfig.c
+++ b/3rdparty/libconfig/libconfig.c
@@ -40,7 +40,7 @@
#include <string.h>
#include <ctype.h>
-#define PATH_TOKENS ":./"
+#define PATH_TOKENS ":/"
#define CHUNK_SIZE 16
#define FLOAT_PRECISION 10
@@ -537,12 +537,13 @@ static int __config_validate_name(const char *name)
if(*p == '\0')
return(CONFIG_FALSE);
- if(! isalpha((int)*p) && (*p != '*'))
+ if(! isalpha((int)*p) && !isdigit((int)*p) && (*p != '*')) {
return(CONFIG_FALSE);
+ }
for(++p; *p; ++p)
{
- if(! (isalpha((int)*p) || isdigit((int)*p) || strchr("*_-'", (int)*p)))
+ if(! (isalpha((int)*p) || isdigit((int)*p) || strchr("*_-'.", (int)*p)))
return(CONFIG_FALSE);
}