From f032be12d21bf309ab7c6db6ccddc9247bfcf9c4 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 17 Nov 2020 08:53:42 +0100 Subject: [PATCH] Fixed printf format --- client/common/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/common/file.c b/client/common/file.c index b98b872c1..3dd1032ab 100644 --- a/client/common/file.c +++ b/client/common/file.c @@ -901,7 +901,7 @@ BOOL freerdp_client_populate_rdp_file_from_settings(rdpFile* file, const rdpSett file->GatewayHostname = _strdup(settings->GatewayHostname); else { - int length = _scprintf("%s:%" PRIu16, settings->GatewayHostname, settings->GatewayPort); + int length = _scprintf("%s:%" PRIu32, settings->GatewayHostname, settings->GatewayPort); if (length < 0) return FALSE; @@ -909,7 +909,7 @@ BOOL freerdp_client_populate_rdp_file_from_settings(rdpFile* file, const rdpSett if (!file->GatewayHostname) return FALSE; - if (sprintf_s(file->GatewayHostname, (size_t)length + 1, "%s:%" PRIu16, + if (sprintf_s(file->GatewayHostname, (size_t)length + 1, "%s:%" PRIu32, settings->GatewayHostname, settings->GatewayPort) < 0) return FALSE; }