From 0d242d704e69a778f9edbcfa96ae3156ff6cda4c Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Fri, 7 Jan 2022 00:06:42 +0000 Subject: [PATCH] Correct cast for snprintf --- src/devices/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/file.c b/src/devices/file.c index 5a2206b..039017f 100644 --- a/src/devices/file.c +++ b/src/devices/file.c @@ -57,7 +57,7 @@ get_entry(char *p, Uint16 len, const char *pathname, const char *basename, int f else if(S_ISDIR(st.st_mode)) return snprintf(p, len, "---- %s\n", basename); else if(st.st_size < 0x10000) - return snprintf(p, len, "%04x %s\n", (Uint16)st.st_size, basename); + return snprintf(p, len, "%04x %s\n", (unsigned int)st.st_size, basename); else return snprintf(p, len, "???? %s\n", basename); }