summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/snprintf.c2
-rw-r--r--main/spprintf.c2
2 files changed, 2 insertions, 2 deletions
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)