Skip to content

Commit 59f2068

Browse files
committed
fix printf format for zend_ulong
1 parent 31b9521 commit 59f2068

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/standard/math.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "zend_portability.h"
2525
#include "zend_bitset.h"
2626

27+
2728
#include <math.h>
2829
#include <float.h>
2930
#include <stdlib.h>
@@ -1147,7 +1148,7 @@ PHPAPI zend_string *_php_math_number_format_long(zend_long num, int dec, const c
11471148
char cur_char;
11481149
int roundup = 0;
11491150

1150-
tmpbuf = strpprintf(0, "%lu", num_abs);
1151+
tmpbuf = strpprintf(0, ZEND_ULONG_FMT, num_abs);
11511152

11521153
/* rounding more places than length of num
11531154
* or same places of length of num with rounding down

0 commit comments

Comments
 (0)