Used proper format string for wide print size_t

This commit is contained in:
akallabeth 2022-01-19 09:05:42 +01:00 committed by akallabeth
parent d73d0d4610
commit b0c4bb5e86

View File

@ -36,6 +36,8 @@
#include <freerdp/client/printer.h>
#define WIDEN_INT(x) L##x
#define WIDEN(x) WIDEN_INT(x)
#define PRINTER_TAG CHANNELS_TAG("printer.client")
#ifdef WITH_DEBUG_WINPR
#define DEBUG_WINPR(...) WLog_DBG(PRINTER_TAG, __VA_ARGS__)
@ -91,9 +93,10 @@ static WCHAR* printer_win_get_printjob_name(size_t id)
if (!str)
return NULL;
rc = swprintf_s(str, len, L"FreeRDP Print %04d-%02d-%02d% 02d-%02d-%02d - Job %lu\0",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec,
id);
rc = swprintf_s(
str, len,
WIDEN("FreeRDP Print %04d-%02d-%02d% 02d-%02d-%02d - Job %") WIDEN(PRIuz) WIDEN("\0"),
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, id);
return str;
}