Mirar @ Pike  developers forum wrote:
>Oh right, I spotted that, yes. snprintf doesn't exist there. But could
>we have some sort of bugfix?

>I'd be happy with a %.10g instead of %f. (Anyone against?)

IMO, as a minimum patch I'd suggest:

    sprintf(buf, "%.*g",
     MAX_FLOAT_SPRINTF_LEN, (double)sp[-1].u.float_number);

It's reasonably accurate, and reasonably safe.
-- 
Sincerely,
           Stephen R. van den Berg.
Auto repair rates: basic labor $40/hour; if you wait, $60; if you watch, $80;
if you ask questions, $100; if you help, $120; if you laugh, $140.

Reply via email to