From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 279 invoked by alias); 28 Oct 2015 09:35:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36997 Received: (qmail 13696 invoked from network); 28 Oct 2015 09:35:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f4-f79c56d0000012ee-15-563096cb4ded Date: Wed, 28 Oct 2015 09:35:04 +0000 From: Peter Stephenson To: Zsh hackers list Subject: Re: Bug: bracketed-paste-magic + ztcp causes wrong pasted contents for CJK payloads Message-id: <20151028093504.756c22b1@pwslap01u.europe.root.pri> In-reply-to: <151027202340.ZM17146@torch.brasslantern.com> References: <151015172503.ZM30721@torch.brasslantern.com> <151027194317.ZM17099@torch.brasslantern.com> <151027202340.ZM17146@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKLMWRmVeSWpSXmKPExsVy+t/xy7qnpxmEGdxab21xsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4Mj7NncVW8IazYvWhB2wNjG/Yuxg5OSQETCQ+337GBGGLSVy4 t56ti5GLQ0hgKaPE6mVvoZwZTBLPH0xhh3C2MUp8fNzDDNLCIqAq0fh+KiuIzSZgKDF102xG EFtEQEtix8mTYGOFBeIkLi//DlbPK2AvcXleBxuIzSlgJfGm/SQrxNCVTBKPl28EK+IX0Je4 +vcT1E32EjOvnGGEaBaU+DH5HguIzQy0YPO2JlYIW15i85q3YL1CAuoSN+7uZp/AKDQLScss JC2zkLQsYGRexSiaWppcUJyUnmuoV5yYW1yal66XnJ+7iRESuF92MC4+ZnWIUYCDUYmH16BC L0yINbGsuDL3EKMEB7OSCO+3FoMwId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rxzd70PERJITyxJ zU5NLUgtgskycXBKNTAuuL3vVtv+ckPLt2bhSjprDn26WX1zUmZu5Mu9G5g8S9ke7frd8pFb 62W+6Yo7eudW3qsU23TT/UaghnTqndLI9P/3OysaZY5ni6Q8U7Iz4X5qm2NxwGoey3++V6FW 5642pKbPZrorxVsl+yNFYa7msjbp+sMBepJHOv2vVfoprPNLSExwS1ViKc5INNRiLipOBABm /hHeWAIAAA== On Tue, 27 Oct 2015 20:23:40 -0700 Bart Schaefer wrote: > AHA! > > tcp.c uses setiparam("REPLY"), so depending on whether $REPLY is already > defined or not, it gets initialized as an integer-typed variable, which > means that when "self-insert" is assigned to REPLY, it's treated as an > arithmetic expression and evaluates to 0. I even noticed this the other day and got confused by it when playing with ztcp myself, and nearly mentioned it. I suspect the biggest problem is when you do stuff from the command line, but it can obviously turn up anywhere. > tcp.c, socket.c, and zpty.c all use setiparam("REPLY"), potentially > inflicting this on other modules that later do setsparam("REPLY"). Yet > another reason for Kurtis to run for the hills. Or you could interpret it as a reason for warncreateglobal. Does that go off correctly if you set it? If not, we might want to try to get it to, even if we take the setitparam()s out. I'd be inclined to get rid of this. There's no good reason for using an integer parameter for something that doesn't need to be involved in arithmetic evaluation at all as it's going to spend its life just as a number of no more than a couple of digits. pws