From 99faaf811d26d9f519b74c61a52409e7e85b8be3 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Mon, 6 Jan 2020 12:29:03 -0800 Subject: [PATCH] Fix snprintf compiler warning in hexdump BIF --- src/strings.bif | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strings.bif b/src/strings.bif index 2553b7d068..4f589bd078 100644 --- a/src/strings.bif +++ b/src/strings.bif @@ -1097,7 +1097,7 @@ function hexdump%(data_str: string%) : string { char offset[5]; snprintf(offset, sizeof(offset), - "%.4x", data_ptr - data); + "%.4tx", data_ptr - data); memcpy(hex_data_ptr, offset, 4); hex_data_ptr += 6; ascii_ptr = hex_data_ptr + 50;