From 98bd6c91538ccc780c0f3ad243a6855cd9fac3fd Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sat, 23 Feb 2008 06:31:40 +0000 Subject: [PATCH] More fixes for telnet interpretation. Was using the wrong condition to test if we should start interpreting from the start of the string... would cause problems for strings ending in a CR --- src/syncterm/telnet_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/syncterm/telnet_io.c b/src/syncterm/telnet_io.c index e4ba712732..2a4ca7b02f 100644 --- a/src/syncterm/telnet_io.c +++ b/src/syncterm/telnet_io.c @@ -109,12 +109,12 @@ BYTE* telnet_interpret(BYTE* inbuf, int inlen, BYTE* outbuf, int *outlen) } } - if(!telnet_cmdlen && first_int==NULL) { + if(telnet_cmdlen==0 && first_int==NULL) { *outlen=inlen; return(inbuf); /* no interpretation needed */ } - if(first_int!=NULL) { + if(telnet_cmdlen==0 /* If we haven't returned and telnet_cmdlen==0 then first_int is not NULL */ ) { *outlen=first_int-inbuf; memcpy(outbuf, inbuf, *outlen); } else -- GitLab