zsh-workers
 help / color / mirror / code / Atom feed
* 0x9F when printing ""
@ 2015-09-18  0:19 Daniel Shahaf
  2015-09-18  4:02 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Shahaf @ 2015-09-18  0:19 UTC (permalink / raw)
  To: zsh-workers

% print -r - ${(qqqq):-""}
$'\237'

That output is wrong; should be «$''».

(Kudos to Mikael for the minimal recipe.)


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

* Re: 0x9F when printing ""
  2015-09-18  0:19 0x9F when printing "" Daniel Shahaf
@ 2015-09-18  4:02 ` Bart Schaefer
  2015-09-19  8:14   ` Jun T.
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2015-09-18  4:02 UTC (permalink / raw)
  To: zsh-workers

On Sep 18, 12:19am, Daniel Shahaf wrote:
}
} % print -r - ${(qqqq):-""}
} $'\237'
} 
} That output is wrong; should be «$''».

diff --git a/Src/utils.c b/Src/utils.c
index ca68eae..d5fd88c 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -5385,6 +5385,12 @@ quotestring(const char *s, char **e, int instring)
     u = s;
     if (instring == QT_DOLLARS) {
 	/*
+	 * The only way to get Nularg here is when
+	 * it is placeholding for the empty string?
+	 */
+	if (inull(*u))
+	    *u++;
+	/*
 	 * As we test for printability here we need to be able
 	 * to look for multibyte characters.
 	 */


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

* Re: 0x9F when printing ""
  2015-09-18  4:02 ` Bart Schaefer
@ 2015-09-19  8:14   ` Jun T.
  0 siblings, 0 replies; 3+ messages in thread
From: Jun T. @ 2015-09-19  8:14 UTC (permalink / raw)
  To: zsh-workers


2015/09/18 13:02, Bart Schaefer <schaefer@brasslantern.com> wrote:
> +	if (inull(*u))
> +	    *u++;

I get the following warning:

utils.c:5392:6: warning: expression result unused [-Wunused-value]
            *u++;
            ^~~~

Dereferencing * may be omitted.


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

end of thread, other threads:[~2015-09-19  8:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-18  0:19 0x9F when printing "" Daniel Shahaf
2015-09-18  4:02 ` Bart Schaefer
2015-09-19  8:14   ` Jun T.

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).