# HG changeset patch # User reimar # Date 1235992211 0 # Node ID f8625bfd9aa54831ef9ef692047f7256c911b03d # Parent 8d5ed38e08d46c51be50be715a9cdf4a740e7834 Use strtoll in parse_int to avoid discrepancies between 32 and 64 bit systems. diff -r 8d5ed38e08d4 -r f8625bfd9aa5 m_option.c --- a/m_option.c Mon Mar 02 11:06:05 2009 +0000 +++ b/m_option.c Mon Mar 02 11:10:11 2009 +0000 @@ -137,16 +137,16 @@ // 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;