]> granicus.if.org Git - php/commitdiff
Make the code lesss suspicious (can't be really 0 but it's not obvious)
authorStanislav Malyshev <stas@php.net>
Tue, 30 Dec 2014 08:16:21 +0000 (00:16 -0800)
committerStanislav Malyshev <stas@php.net>
Tue, 30 Dec 2014 08:16:21 +0000 (00:16 -0800)
ext/standard/formatted_print.c

index 26a2276feabe162e1ba02c3df746158929a5ea71..22fd1a87985867337b1f6e466f9dc7af88565eb0 100644 (file)
@@ -12,7 +12,7 @@
    | obtain it through the world-wide-web, please send a note to          |
    | license@php.net so we can mail you a copy immediately.               |
    +----------------------------------------------------------------------+
-   | Author: Stig Sæther Bakken <ssb@php.net>                             |
+   | Author: Stig Sther Bakken <ssb@php.net>                             |
    +----------------------------------------------------------------------+
  */
 
@@ -155,7 +155,7 @@ php_sprintf_appendint(zend_string **buffer, size_t *pos, zend_long number,
                numbuf[--i] = (unsigned char)(magn - (nmagn * 10)) + '0';
                magn = nmagn;
        }
-       while (magn > 0 && i > 0);
+       while (magn > 0 && i > 1);
        if (neg) {
                numbuf[--i] = '-';
        } else if (always_sign) {