mirror of
https://github.com/mpv-player/mpv
synced 2024-12-17 12:25:03 +00:00
Use strtoll in parse_int to avoid discrepancies between 32 and 64 bit systems.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28793 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3dbe44fc07
commit
b9102d0b06
@ -137,16 +137,16 @@ const m_option_type_t m_option_type_flag = {
|
||||
// Integer
|
||||
|
||||
static int parse_int(const m_option_t* opt,const char *name, char *param, void* dst, int src) {
|
||||
long tmp_int;
|
||||
long long tmp_int;
|
||||
char *endptr;
|
||||
src = 0;
|
||||
|
||||
if (param == NULL)
|
||||
return M_OPT_MISSING_PARAM;
|
||||
|
||||
tmp_int = strtol(param, &endptr, 10);
|
||||
tmp_int = strtoll(param, &endptr, 10);
|
||||
if (*endptr)
|
||||
tmp_int = strtol(param, &endptr, 0);
|
||||
tmp_int = strtoll(param, &endptr, 0);
|
||||
if (*endptr) {
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",name, param);
|
||||
return M_OPT_INVALID;
|
||||
|
Loading…
Reference in New Issue
Block a user