Commit 4a44ee69 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix reading integers from vlcrc

parent ea409cf9
...@@ -145,13 +145,15 @@ static int64_t strtoi (const char *str) ...@@ -145,13 +145,15 @@ static int64_t strtoi (const char *str)
if (!errno) if (!errno)
{ {
if ((l > INT64_C(0x7fffffffffffffff)) #if (LLONG_MAX > 0x7fffffffffffffffLL)
|| (l < INT64_C(-0x8000000000000000))) if (l > 0x7fffffffffffffffLL
|| l < -0x8000000000000000LL)
errno = ERANGE; errno = ERANGE;
#endif
if (*end) if (*end)
errno = EINVAL; errno = EINVAL;
} }
return (int)l; return l;
} }
#undef config_LoadConfigFile #undef config_LoadConfigFile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment