From: simon Date: Fri, 1 Nov 2002 12:52:51 +0000 (+0000) Subject: Split a trigraph sequence in a string constant. X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/24d7f85497ff87203d0d201cf964fcf9009abbb6 Split a trigraph sequence in a string constant. git-svn-id: svn://svn.tartarus.org/sgt/putty@2166 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/telnet.c b/telnet.c index 18c7d0e4..f20488e3 100644 --- a/telnet.c +++ b/telnet.c @@ -226,9 +226,14 @@ static void c_write1(Telnet telnet, int c) static void log_option(Telnet telnet, char *sender, int cmd, int option) { char buf[50]; + /* + * The strange-looking "" below is there to avoid a + * trigraph - a double question mark followed by > maps to a + * closing brace character! + */ sprintf(buf, "%s:\t%s %s", sender, (cmd == WILL ? "WILL" : cmd == WONT ? "WONT" : - cmd == DO ? "DO" : cmd == DONT ? "DONT" : ""), + cmd == DO ? "DO" : cmd == DONT ? "DONT" : ""), telopt(option)); logevent(telnet->frontend, buf); }