zsh-workers
 help / color / mirror / code / Atom feed
* Repeatable crash in latest zsh
@ 1999-03-10 16:33 Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1999-03-10 16:33 UTC (permalink / raw)
  To: zsh-workers

This has been happening for about a week, I think, so it isn't something
from the most recent patches, but it still happens even with everything
posted so far.  This input:

zsh% setopt completeinword
zsh% ZSH=<C-b><TAB>

(that is, expand-or-complete before the '=') causes `zsh -f` to crash.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Repeatable crash in latest zsh
@ 1999-03-10 16:50 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-03-10 16:50 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> This has been happening for about a week, I think, so it isn't something
> from the most recent patches, but it still happens even with everything
> posted so far.  This input:
> 
> zsh% setopt completeinword
> zsh% ZSH=<C-b><TAB>
> 
> (that is, expand-or-complete before the '=') causes `zsh -f` to crash.

The code was to eager to restrict the things to `the string after the
equal sign', forgetting to test if it was after it.

Bye
 Sven

--- os/Zle/zle_tricky.c	Wed Mar 10 10:49:47 1999
+++ Src/Zle/zle_tricky.c	Wed Mar 10 17:49:18 1999
@@ -1278,7 +1278,7 @@
 	    *s = sav;
 	    if (skipparens(Inbrack, Outbrack, &s) > 0 || s > tt + cs - wb)
 		s = NULL, inwhat = IN_MATH, insubscr = 1;
-	    else if (*s == '=') {
+	    else if (*s == '=' && cs > wb + (s - tt)) {
 		s++;
 		wb += s - tt;
 		t0 = STRING;

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-03-10 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-10 16:33 Repeatable crash in latest zsh Bart Schaefer
1999-03-10 16:50 Sven Wischnowsky

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).