Skip to content

Commit 85d436d

Browse files
committed
Amend non cross-platform print format strings
Thanks OSX Travis Build!
1 parent e2398d4 commit 85d436d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

saxbospiral/render_backends/backend_pbm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2626
*/
2727
#include <assert.h>
28+
#include <inttypes.h>
2829
#include <math.h>
2930
#include <stddef.h>
3031
#include <stdint.h>
@@ -65,8 +66,8 @@ sxbp_status_t sxbp_render_backend_pbm(
6566
// these are used to keep track of how many digits each is
6667
int width_string_length, height_string_length = 0;
6768
// convert width and height to a decimal string, store lengths
68-
width_string_length = sprintf(width_string, "%lu", bitmap.width);
69-
height_string_length = sprintf(height_string, "%lu", bitmap.height);
69+
width_string_length = sprintf(width_string, PRIu64, bitmap.width);
70+
height_string_length = sprintf(height_string, PRIu64, bitmap.height);
7071
/*
7172
* now that we know the length of the image dimension strings, we can now
7273
* calculate how much memory we'll have to allocate for the image buffer

0 commit comments

Comments
 (0)