aboutsummaryrefslogtreecommitdiff
path: root/src/hash/xxh.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-08-26 16:13:19 -0500
committerame <[email protected]>2024-08-26 16:13:25 -0500
commit7a15e796e8789b51a459af7fe890e02a416e1fc7 (patch)
tree5d6e80abc948ba0034d3b4f32bba6746d95735e5 /src/hash/xxh.c
parent064376146afad7af0b496014c59ba4b4f78d4c78 (diff)
use integer format macros
Diffstat (limited to 'src/hash/xxh.c')
-rw-r--r--src/hash/xxh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hash/xxh.c b/src/hash/xxh.c
index 052db3f..3fd213c 100644
--- a/src/hash/xxh.c
+++ b/src/hash/xxh.c
@@ -1,6 +1,7 @@
#include "../crypto.h"
#include <stdio.h>
#include <stdint.h>
+#include <inttypes.h>
#define max_buffer_size32 16
#define max_buffer_size64 32
@@ -129,7 +130,7 @@ int l_xxh64(lua_State* L){
char digest[64];
uint64_t u = i_xxhash64(a, seed, len);
- sprintf(digest,"%016llx",u);
+ sprintf(digest,"%016"PRIx64,u);
lua_pushstring(L, digest);
return 1;