X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=raw.c;h=97355e8ad768bd38df89bc653736a386c9143c5b;hb=f004bcca17a789356c32527a396b68b71a773db2;hp=1d9f854cd65f77e1b9b7cec754a58462133aaa2e;hpb=ea301bdd9b892a5e70692f82f5c0b98bd585e775;p=PuTTY.git diff --git a/raw.c b/raw.c index 1d9f854c..97355e8a 100644 --- a/raw.c +++ b/raw.c @@ -146,6 +146,7 @@ static const char *raw_init(void *frontend_handle, void **backend_handle, raw->closed_on_socket_error = FALSE; *backend_handle = raw; raw->sent_console_eof = raw->sent_socket_eof = FALSE; + raw->bufsize = 0; raw->frontend = frontend_handle; @@ -185,15 +186,10 @@ static const char *raw_init(void *frontend_handle, void **backend_handle, sfree(*realhost); *realhost = dupstr(loghost); - colon = strrchr(*realhost, ':'); - if (colon) { - /* - * FIXME: if we ever update this aspect of ssh.c for - * IPv6 literal management, this should change in line - * with it. - */ + + colon = host_strrchr(*realhost, ':'); + if (colon) *colon++ = '\0'; - } } return NULL;