diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2003-06-30 01:03:21 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2003-06-30 01:03:21 +0000 |
| commit | 8cb5c9c6bad0c79cb8b936c5017ca799ae50cd6c (patch) | |
| tree | 0ae7b2fa68ad4582c8a635370a91143e3d83b7a5 /main/snprintf.c | |
| parent | 68749958ab24f88e85f90409eb27456aaddd49de (diff) | |
| download | php-git-8cb5c9c6bad0c79cb8b936c5017ca799ae50cd6c.tar.gz | |
Fixed bug #24063 (*printf() did not handle scientific notation correctly)
Diffstat (limited to 'main/snprintf.c')
| -rw-r--r-- | main/snprintf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/snprintf.c b/main/snprintf.c index 2e74eb952e..71fb78f9d1 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -404,6 +404,9 @@ ap_php_gcvt(double number, int ndigit, char *buf, boolean_e altform) *p2++ = '.'; for (i = 1; i < ndigit; i++) *p2++ = *p1++; + if (*(p2 - 1) == '.') { + *p2++ = '0'; + } *p2++ = 'e'; if (decpt < 0) { decpt = -decpt; |
