cvs: php4 /main snprintf.c
| From: | Ilia Alshanetsky | Date: | Thu, 13 Feb 2003 19:02:35 +0000 |
| Subject: | cvs: php4 /main snprintf.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-18796@lists.php.net to get a copy of this message | ||
iliaa Thu Feb 13 14:02:35 2003 EDT
Modified files:
/php4/main snprintf.c
Log:
Modified fix for bug #22187 so that it does not affect handling of numbers
represented in scientific notation.
Index: php4/main/snprintf.c
diff -u php4/main/snprintf.c:1.18 php4/main/snprintf.c:1.19
--- php4/main/snprintf.c:1.18 Wed Feb 12 15:41:53 2003
+++ php4/main/snprintf.c Thu Feb 13 14:02:34 2003
@@ -298,7 +298,10 @@
while (p1 < &buf[NDIG])
*p++ = *p1++;
} else if (arg > 0) {
- while ((fj = arg * 10) < 1 && (r2 * -1) < ndigits) {
+ while ((fj = arg * 10) < 1) {
+ if (!eflag && (r2 * -1) < ndigits) {
+ break;
+ }
arg = fj;
r2--;
}