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

index 06a1f9d735534023a549feed2f219473552963a7..feec9bdddf1cc69fd976388601e91d2443f0a409 100644 (file)
@@ -174,7 +174,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 = ' ';