]> git.sesse.net Git - vlc/commitdiff
Fix reading integers from vlcrc
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 11 Jul 2010 15:22:29 +0000 (18:22 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 11 Jul 2010 15:23:41 +0000 (18:23 +0300)
src/config/file.c

index b802ce3d4035b91478152036dd9a0c976089ce61..71a02df8e672d25313cdd224d13f7e8ebbc6db97 100644 (file)
@@ -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