summaryrefslogtreecommitdiffstats
path: root/m_option.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-02 11:10:11 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-02 11:10:11 +0000
commitb9102d0b06e8f7cd9c0c4d762a09af3bdf292a19 (patch)
treebd797257da4f8baf90359532ea91bbeb6537ecf0 /m_option.c
parent3dbe44fc070dafb1aadfb8c299afe5f82a617f77 (diff)
downloadmpv-b9102d0b06e8f7cd9c0c4d762a09af3bdf292a19.tar.bz2
mpv-b9102d0b06e8f7cd9c0c4d762a09af3bdf292a19.tar.xz
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
Diffstat (limited to 'm_option.c')
-rw-r--r--m_option.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/m_option.c b/m_option.c
index e1b2ecdc88..80dc4c0e9c 100644
--- a/m_option.c
+++ b/m_option.c
@@ -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;