From 9bcd5f3c0aac51af390b77d725c124e42baa60cd Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 5 Jan 2016 12:32:33 +0800 Subject: Fix print format specifier --- svr-x11fwd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svr-x11fwd.c') diff --git a/svr-x11fwd.c b/svr-x11fwd.c index 144ec0b..9e7df24 100644 --- a/svr-x11fwd.c +++ b/svr-x11fwd.c @@ -142,7 +142,7 @@ void x11setauth(struct ChanSess *chansess) { } /* create the DISPLAY string */ - val = snprintf(display, sizeof(display), "localhost:%d.%d", + val = snprintf(display, sizeof(display), "localhost:%d.%u", chansess->x11port - X11BASEPORT, chansess->x11screennum); if (val < 0 || val >= (int)sizeof(display)) { /* string was truncated */ @@ -152,7 +152,7 @@ void x11setauth(struct ChanSess *chansess) { addnewvar("DISPLAY", display); /* create the xauth string */ - val = snprintf(display, sizeof(display), "unix:%d.%d", + val = snprintf(display, sizeof(display), "unix:%d.%u", chansess->x11port - X11BASEPORT, chansess->x11screennum); if (val < 0 || val >= (int)sizeof(display)) { /* string was truncated */ -- cgit v1.2.3