1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-01 11:50:48 +00:00

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
This commit is contained in:
reimar 2006-06-15 08:09:03 +00:00
parent 49192fddd6
commit f3f1509ba9

View File

@ -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);