]> granicus.if.org Git - php/commitdiff
Change printf %u behavior so that it does not truncate numbers at 32-bits. (Reported...
authorBrian Shire <shire@php.net>
Sun, 3 Jun 2007 09:11:52 +0000 (09:11 +0000)
committerBrian Shire <shire@php.net>
Sun, 3 Jun 2007 09:11:52 +0000 (09:11 +0000)
ext/standard/formatted_print.c

index ee264ea1077d591354d73e918c4f504142381b0e..000457ab832cb49e7568900b22d7b3cd0457254c 100644 (file)
@@ -278,7 +278,7 @@ php_sprintf_appenduint(char **buffer, int *pos, int *size,
 
        PRINTF_DEBUG(("sprintf: appenduint(%x, %x, %x, %d, %d, '%c', %d)\n",
                                  *buffer, pos, size, number, width, padding, alignment));
-       magn = (unsigned int) number;
+       magn = (unsigned long) number;
 
        /* Can't right-pad 0's on integers */
        if (alignment == 0 && padding == '0') padding = ' ';