From f06c066f0a3e16bea077f9928d2e4fd5b85e21b0 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Tue, 24 Feb 2026 08:53:01 +0100 Subject: [PATCH] [channels,printer] fix missing includes and format string --- channels/printer/client/win/printer_win.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/channels/printer/client/win/printer_win.c b/channels/printer/client/win/printer_win.c index 7abc55e6f..b764793b3 100644 --- a/channels/printer/client/win/printer_win.c +++ b/channels/printer/client/win/printer_win.c @@ -34,6 +34,7 @@ #include #include +#include #define WIDEN_INT(x) L##x #define WIDEN(x) WIDEN_INT(x) @@ -75,7 +76,7 @@ typedef struct WINPR_ATTR_MALLOC(free, 1) static WCHAR* printer_win_get_printjob_name(size_t id) { - struct tm tres; + struct tm tres = { 0 }; WCHAR* str = NULL; size_t len = 0; @@ -93,7 +94,7 @@ static WCHAR* printer_win_get_printjob_name(size_t id) const int rc = swprintf_s( str, len, - WIDEN("%s Print %04d-%02d-%02d% 02d-%02d-%02d - Job %") WIDEN(PRIuz) WIDEN("\0"), + WIDEN("%s Print %04d-%02d-%02d %02d-%02d-%02d - Job %") WIDEN(PRIuz) WIDEN("\0"), freerdp_getApplicationDetailsStringW(), tres.tm_year + 1900, tres.tm_mon + 1, tres.tm_mday, tres.tm_hour, tres.tm_min, tres.tm_sec, id); if (rc <= 0)