Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c43233c

Browse files
committed
Print 64-bit integer with portable PRId64 macro
1 parent fecdde2 commit c43233c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎jvm.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*/
33

44
#include <assert.h>
5+
#include <inttypes.h>
56
#include <stdbool.h>
67
#include <stdint.h>
78
#include <stdio.h>
@@ -173,7 +174,7 @@ static inline void invokevirtual(stack_frame_t *op_stack)
173174
int64_t op = pop_int(op_stack);
174175

175176
/* FIXME: the implement is not correct. */
176-
printf("%ld\n", op);
177+
printf("%"PRId64"\n", op);
177178
}
178179

179180
static inline void iconst(stack_frame_t *op_stack, uint8_t current)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /