[MPlayer-users] BUG: m_option.c parsing -0.## floats
Petr Pajas
pajas at ufal.ms.mff.cuni.cz
Sat Feb 15 16:47:47 CET 2003
Hi,
there is an obvious bug in m_option.c around line 180 parsing
float options like -delay causing -delay -0.3 to behave like -delay
0.3 (after parsing the integer part of the string, tmp_float==0 and the
sign of the whole expression cannot be determined from it).
workaround: use -delay -1/3
if(tmp_float<0) // wrong if tmp_float == 0
tmp_float -= 1.0/pow(10,strlen(endptr+1)) * strtod(endptr+1,
&endptr);
else
tmp_float += 1.0/pow(10,strlen(endptr+1)) * strtod(endptr+1,
&endptr);
break;
-- Petr
More information about the MPlayer-users
mailing list