Mercurial > hg > xemacs-beta
diff src/doprnt.c @ 3705:fcf6ccb70eea
[xemacs-hg @ 2006-11-28 13:01:27 by aidan]
Fix a crash when (format "%f" 1.2e+302) is evaluated.
author | aidan |
---|---|
date | Tue, 28 Nov 2006 13:01:29 +0000 |
parents | 3d8143fc88e1 |
children | 4ca1ef2bdb6a |
line wrap: on
line diff
--- a/src/doprnt.c Mon Nov 27 22:51:20 2006 +0000 +++ b/src/doprnt.c Tue Nov 28 13:01:29 2006 +0000 @@ -776,16 +776,9 @@ #endif /* HAVE_BIGFLOAT */ else { - /* ASCII Decimal representation uses 2.4 times as many - bits as machine binary. */ - char *text_to_print = - alloca_array (char, 32 + - max (spec->minwidth, - (int) max (sizeof (double), - sizeof (long)) * 3 + - max (spec->precision, 0))); - char constructed_spec[100]; - char *p = constructed_spec; + Ibyte *text_to_print = alloca_array (char, 350); + Ibyte constructed_spec[100]; + Ibyte *p = constructed_spec; /* Mostly reconstruct the spec and use sprintf() to format the string. */