Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Quoting problem and crashes with ${(#)var}
- X-seq: zsh-workers 23187
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Quoting problem and crashes with ${(#)var}
- Date: Sun, 25 Feb 2007 15:15:43 -0800
- In-reply-to: <20070214161951.e8219d6c.pws@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200702132111.l1DLB5rA003849@xxxxxxxxxxxxxxxxx> <070213234815.ZM5424@xxxxxxxxxxxxxxxxxxxxxx> <200702141016.l1EAGpKF016735@xxxxxxxxxxxxxx> <070214080347.ZM26428@xxxxxxxxxxxxxxxxxxxxxx> <20070214161951.e8219d6c.pws@xxxxxxx>
(Just back from a week-long vacation trip.)
On Feb 14, 4:19pm, Peter Stephenson wrote:
} Subject: Re: Quoting problem and crashes with ${(#)var}
}
} Ah. Try this.
It's broken -- it doesn't set *widthp and *swidep when returning
nicechar().
I'm not certain the following is the right way to fix it; is something
more wide-char-aware than strcpy/strlen needed?
--- ../zsh-forge/current/Src/utils.c 2007-02-25 14:06:38.000000000 -0800
+++ Src/utils.c 2007-02-25 15:01:14.000000000 -0800
@@ -519,7 +519,9 @@
if (widthp)
*widthp = 6;
} else {
- return nicechar((int)c);
+ strcpy(buf, nicechar((int)c));
+ if (widthp)
+ *widthp = strlen(buf);
}
if (swidep)
*swidep = buf + *widthp;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author