• Ganesh Ajjanagadde's avatar
    avutil/libm: fix isnan compatibility hack · 29af74e4
    Ganesh Ajjanagadde authored
    Commit 14ea4151 had a bug in that the
    conversion of the uint64_t result to an int (the return signature) would
    lead to implementation defined behavior, and in this case simply
    returned 0 for NAN. A fix via AND'ing the result with 1 does the trick,
    simply by ensuring a 0 or 1 return value.
    
    Patch tested with FATE on x86-64, GNU/Linux by forcing the compatibility
    code via an ifdef hack suggested by Michael.
    Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
    29af74e4
libm.h 5.18 KB