helly           Fri Aug  8 15:48:33 2003 EDT

  Modified files:              
    /php-src/main       snprintf.c 
  Log:
  Clearify
  
Index: php-src/main/snprintf.c
diff -u php-src/main/snprintf.c:1.26 php-src/main/snprintf.c:1.27
--- php-src/main/snprintf.c:1.26        Fri Aug  8 15:47:30 2003
+++ php-src/main/snprintf.c     Fri Aug  8 15:48:33 2003
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: snprintf.c,v 1.26 2003/08/08 19:47:30 helly Exp $ */
+/* $Id: snprintf.c,v 1.27 2003/08/08 19:48:33 helly Exp $ */
 
 /* ====================================================================
  * Copyright (c) 1995-1998 The Apache Group.  All rights reserved.
@@ -315,14 +315,12 @@
                p1 = &buf[NDIG];
                while (fi != 0) {
                        fj = modf(fi / 10, &fi);
-                       if (p1 > &buf[0]) {
-                               *--p1 = (int) ((fj + .03) * 10) + '0';
-                       } else {
+                       if (p1 <= &buf[0]) {
                                mvl = NDIG - ndigits;
                                memmove(&buf[mvl], &buf[0], NDIG-mvl-1);
                                p1 += mvl;
-                               *--p1 = (int) ((fj + .03) * 10) + '0';
                        }
+                       *--p1 = (int) ((fj + .03) * 10) + '0';
                        r2++;
                }
                while (p1 < &buf[NDIG])



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to