From: RĂ©mi Denis-Courmont Date: Sun, 11 Jul 2010 15:22:29 +0000 (+0300) Subject: Fix reading integers from vlcrc X-Git-Tag: 1.2.0-pre1~5864 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4a44ee69d45616c02e40f2c3760a5a640e560773;p=vlc Fix reading integers from vlcrc --- diff --git a/src/config/file.c b/src/config/file.c index b802ce3d40..71a02df8e6 100644 --- a/src/config/file.c +++ b/src/config/file.c @@ -145,13 +145,15 @@ static int64_t strtoi (const char *str) if (!errno) { - if ((l > INT64_C(0x7fffffffffffffff)) - || (l < INT64_C(-0x8000000000000000))) +#if (LLONG_MAX > 0x7fffffffffffffffLL) + if (l > 0x7fffffffffffffffLL + || l < -0x8000000000000000LL) errno = ERANGE; +#endif if (*end) errno = EINVAL; } - return (int)l; + return l; } #undef config_LoadConfigFile