From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17748 invoked by alias); 25 Jul 2015 20:46:11 -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: 35910 Received: (qmail 5986 invoked from network); 25 Jul 2015 20:46:10 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=TNS4MARa c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=0eem8ZXnUjv2UcgUkREA:9 a=CjuIK1q_8ugA:10 Date: Sat, 25 Jul 2015 21:46:06 +0100 From: Peter Stephenson To: Zsh hackers list Subject: PATCH: more math completion Message-ID: <20150725214606.66a43ba2@ntlworld.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit % echo $((3*4) causes a segmentation violation. Looks like we're trying to extend the raw buffer where we've attempted (and failed) to find a math expression when we have no business doing so. pws diff --git a/Src/input.c b/Src/input.c index 613f89a..1efabad 100644 --- a/Src/input.c +++ b/Src/input.c @@ -222,7 +222,8 @@ ingetc(void) if (inputline()) break; } - zshlex_raw_add(lastc); + if (!lexstop) + zshlex_raw_add(lastc); return lastc; }