diff svr-x11fwd.c @ 1237:888e3d17e962

Fix print format specifier
author Chocobo1 <Chocobo1@users.noreply.github.com>
date Tue, 05 Jan 2016 12:32:33 +0800
parents aaf576b27a10
children 428d83f2e5db
line wrap: on
line diff
--- a/svr-x11fwd.c	Tue Jan 05 12:25:10 2016 +0800
+++ b/svr-x11fwd.c	Tue Jan 05 12:32:33 2016 +0800
@@ -142,7 +142,7 @@
 	}
 
 	/* 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 @@
 	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 */