]> git.sesse.net Git - vlc/commitdiff
variables: check that FLT_RADIX is two
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 26 Oct 2014 18:57:07 +0000 (20:57 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 26 Oct 2014 18:57:07 +0000 (20:57 +0200)
src/misc/variables.c

index 300507427bc3775258b11465b2bd970a9d31f184..04b3750f90b6739290ae45114ccd04deb1f44875 100644 (file)
@@ -1321,6 +1321,9 @@ int (var_InheritURational)(vlc_object_t *object,
             d = 1;
         } else if (exp <= 0) {
             n = floor(scalbn(f, ubits - 1 + exp));
+#if (FLT_RADIX != 2)
+# error Floating point configuration not supported.
+#endif
             d = 1u << (ubits - 1);
         } else if (exp <= ubits) {
             n = floor(scalbn(f, ubits));