about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-08-30 15:18:25 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-08-30 15:18:25 +0000
commit0564c9e999e37a6941c99848bc4f58e531ce6e7c (patch)
tree0276bce0a6f6e12317a581f64da603c446ed753f /Src
parent4af9d9731744b496059acd32cbc98ecf2c896ea6 (diff)
downloadzsh-0564c9e999e37a6941c99848bc4f58e531ce6e7c.tar.gz
zsh-0564c9e999e37a6941c99848bc4f58e531ce6e7c.tar.xz
zsh-0564c9e999e37a6941c99848bc4f58e531ce6e7c.zip
23808: debugging for wcs_nicechar()
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/utils.c b/Src/utils.c
index ce1a78218..c0081f8e1 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -552,8 +552,12 @@ wcs_nicechar(wchar_t c, size_t *widthp, char **swidep)
     if (swidep)
 	*swidep = s;
     for (mbptr = mbstr; ret; s++, mbptr++, ret--) {
+	DPUTS(s >= buf + NICECHAR_MAX,
+	      "BUG: buffer too small in wcs_nicechar");
 	if (imeta(*mbptr)) {
 	    *s++ = Meta;
+	    DPUTS(s >= buf + NICECHAR_MAX,
+		  "BUG: buffer too small for metafied char in wcs_nicechar");
 	    *s = *mbptr ^ 32;
 	} else {
 	    *s = *mbptr;