From: Brian Shire Date: Sun, 3 Jun 2007 09:12:04 +0000 (+0000) Subject: MFH: Change printf %u behavior so that it does not truncate numbers at 32-bits. ... X-Git-Tag: php-5.2.4RC1~451 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79e3c883525b864d8d73d0ce77e1739f588ac100;p=php MFH: Change printf %u behavior so that it does not truncate numbers at 32-bits. (Reported by Aditya Agarwal.) --- diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index 06a1f9d735..feec9bdddf 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -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 = ' ';