about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2015-05-10 01:55:30 +0200
committerMikael Magnusson <mikachu@gmail.com>2015-05-10 01:59:08 +0200
commitbb2362e2c049602b79116aa9570a72dd89711349 (patch)
treee024ece3727448c33524953a37052310c4a41ecb /Src
parent949d186d6cf66149a82908e3c8043189c6c69533 (diff)
downloadzsh-bb2362e2c049602b79116aa9570a72dd89711349.tar.gz
zsh-bb2362e2c049602b79116aa9570a72dd89711349.tar.xz
zsh-bb2362e2c049602b79116aa9570a72dd89711349.zip
Don't treat NUL as a combining character
Diffstat (limited to 'Src')
-rw-r--r--Src/zsh.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index 486ad800a..bb52e106d 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -2978,9 +2978,9 @@ typedef wint_t convchar_t;
  * We can't be quite sure the wcwidth we've provided is entirely
  * in agreement with the system's, so be extra safe.
  */
-#define IS_COMBINING(wc)	(WCWIDTH(wc) == 0 && !iswcntrl(wc))
+#define IS_COMBINING(wc)	(wc != 0 && WCWIDTH(wc) == 0 && !iswcntrl(wc))
 #else
-#define IS_COMBINING(wc)	(WCWIDTH(wc) == 0)
+#define IS_COMBINING(wc)	(wc != 0 && WCWIDTH(wc) == 0)
 #endif
 /*
  * Test for the base of a combining character.