From bb2362e2c049602b79116aa9570a72dd89711349 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 10 May 2015 01:55:30 +0200 Subject: Don't treat NUL as a combining character --- ChangeLog | 4 ++++ Src/zsh.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 816de456a..7c2b62990 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-05-10 Mikael Magnusson + + * 35065: Src/zsh.h: Don't treat NUL as a combining character + 2015-05-09 Daniel Shahaf * 35066: Completion/Unix/Command/_python 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. -- cgit 1.4.1