diff options
author | Adam <Adam@anope.org> | 2012-10-31 14:31:43 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-31 14:31:43 -0400 |
commit | 3e6d8382853d3dd6ca371220a4a2891d5a56acc5 (patch) | |
tree | 4e5f914b904c76338c041228f14ef9a4df1bdebe /src | |
parent | 64dd3c6655b6044d06bed018912173b6f6d287fb (diff) |
Use base 10 for strtol() in the config parser to prevent numbers beginning with 0 from confusing it
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 6 |
1 files changed, 3 insertions, 3 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", |