summaryrefslogtreecommitdiffstats
path: root/m_option.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-15 08:09:03 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-15 08:09:03 +0000
commitf3f1509ba9f413aef8152ec53f91ad4d4437c0b7 (patch)
tree0ed5b6ac891e870a629154352fb803360244811a /m_option.c
parent49192fddd6271a5d7bbbf20b1b2a3bef42f4e8bc (diff)
downloadmpv-f3f1509ba9f413aef8152ec53f91ad4d4437c0b7.tar.bz2
mpv-f3f1509ba9f413aef8152ec53f91ad4d4437c0b7.tar.xz
Do not parse numbers as octal, strip leading zeroes instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18721 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'm_option.c')
-rw-r--r--m_option.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/m_option.c b/m_option.c
index bdf0a4da11..5baeef41f6 100644
--- a/m_option.c
+++ b/m_option.c
@@ -143,6 +143,8 @@ static int parse_int(m_option_t* opt,char *name, char *param, void* dst, int src
if (param == NULL)
return M_OPT_MISSING_PARAM;
+ tmp_int = strtol(param, &endptr, 10);
+ if (*endptr)
tmp_int = strtol(param, &endptr, 0);
if (*endptr) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",name, param);