From: Dmitry Stogov Date: Mon, 25 Jun 2007 08:39:10 +0000 (+0000) Subject: Restore big exponent letter in var_export() ('1e300' -> '1E300') X-Git-Tag: php-5.2.4RC1~303 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa54d9e38549422eb5e26740f735413d49fc35f9;p=php Restore big exponent letter in var_export() ('1e300' -> '1E300') --- diff --git a/main/snprintf.c b/main/snprintf.c index d9aca450c3..861242d193 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -1036,7 +1036,7 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) / lconv = localeconv(); } #endif - s = php_gcvt(fp_num, precision, *fmt=='H' ? '.' : LCONV_DECIMAL_POINT, (*fmt == 'G')?'E':'e', &num_buf[1]); + s = php_gcvt(fp_num, precision, *fmt=='H' ? '.' : LCONV_DECIMAL_POINT, (*fmt == 'G' || *fmt == 'H')?'E':'e', &num_buf[1]); if (*s == '-') { prefix_char = *s++; } else if (print_sign) { diff --git a/main/spprintf.c b/main/spprintf.c index 8b576c0ed7..88e87f1dcd 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -619,7 +619,7 @@ static void xbuf_format_converter(smart_str *xbuf, const char *fmt, va_list ap) lconv = localeconv(); } #endif - s = php_gcvt(fp_num, precision, *fmt=='H' ? '.' : LCONV_DECIMAL_POINT, (*fmt == 'G')?'E':'e', &num_buf[1]); + s = php_gcvt(fp_num, precision, *fmt=='H' ? '.' : LCONV_DECIMAL_POINT, (*fmt == 'G' || *fmt == 'H')?'E':'e', &num_buf[1]); if (*s == '-') prefix_char = *s++; else if (print_sign)