summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-31 14:31:43 -0400
committerAdam <Adam@anope.org>2012-10-31 14:31:43 -0400
commit3e6d8382853d3dd6ca371220a4a2891d5a56acc5 (patch)
tree4e5f914b904c76338c041228f14ef9a4df1bdebe
parent64dd3c6655b6044d06bed018912173b6f6d287fb (diff)
Use base 10 for strtol() in the config parser to prevent numbers beginning with 0 from confusing it
-rw-r--r--src/config.c6
-rw-r--r--version.log3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c
index 2617c8d4b..ad3a51fbe 100644
--- a/src/config.c
+++ b/src/config.c
@@ -723,7 +723,7 @@ int parse_directive(Directive * d, char *dir, int ac, char *av[MAXPARAMS],
}
switch (d->params[i].type) {
case PARAM_INT:
- val = strtol(av[optind++], &s, 0);
+ val = strtol(av[optind++], &s, 10);
if (*s) {
error(linenum,
"%s: Expected an integer for parameter %d",
@@ -734,7 +734,7 @@ int parse_directive(Directive * d, char *dir, int ac, char *av[MAXPARAMS],
*(int *) d->params[i].ptr = val;
break;
case PARAM_POSINT:
- val = strtol(av[optind++], &s, 0);
+ val = strtol(av[optind++], &s, 10);
if (*s || val <= 0) {
error(linenum,
"%s: Expected a positive integer for parameter %d",
@@ -751,7 +751,7 @@ int parse_directive(Directive * d, char *dir, int ac, char *av[MAXPARAMS],
*(int *) d->params[i].ptr = val;
break;
case PARAM_PORT:
- val = strtol(av[optind++], &s, 0);
+ val = strtol(av[optind++], &s, 10);
if (*s) {
error(linenum,
"%s: Expected a port number for parameter %d",
diff --git a/version.log b/version.log
index b69f52bcf..f7a4e77d5 100644
--- a/version.log
+++ b/version.log
@@ -8,9 +8,10 @@ VERSION_MAJOR="1"
VERSION_MINOR="8"
VERSION_PATCH="8"
VERSION_EXTRA="-git"
-VERSION_BUILD="3100"
+VERSION_BUILD="3101"
# Changes since 1.8.7 Release
+#Revision 3101 - Use base 10 for strtol() in the config parser to prevent numbers beginning with 0 from confusing it
#Revision 3100 - Fix typo in NICK_SASET_MSG_SYNTAX
#Revision 3098 - Made all module functions static to fix OSX's linker from linking modules with similar function names to each other
#Revision 3097 - Do not apply akills or sxlines that are pending expiration