Re: Crashing g_string_sprintf when printing invalid floats. gtk+-1.2.9 on Linux



On Wed, 14 Aug 2002, Eric M. Monsler wrote (edited)

> >>tmp_float = (float)strtod("6.0e-44",NULL);

> > In the example above, inspecting errno would have
> > shown that tmp_float did not have an acceptable value...

> Inspecting errno when?  After the cast from double to float?

After strtod, error = ERANGE.

> Did you write the routine in 1.2.x that computes how many bytes the
> string may need?

No, not I.  Anyway, I take your point that there's a problem with that
routine.

Allin Cottrell.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]