commit 0d242d704e69a778f9edbcfa96ae3156ff6cda4c
parent 91560c6d2413a8a106ae72f293dd39245f9d93b7
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date: Fri, 7 Jan 2022 00:06:42 +0000
Correct cast for snprintf
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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);
}