From: Steve Bennett Date: Sun, 25 Sep 2011 21:34:10 +0000 (+1000) Subject: Tabs not inserted as control characters X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=139d94c45a8bc6f00900e4fa8f1699433a78c56f;p=linenoise.git Tabs not inserted as control characters Due to missing parens in non-utf8 version of utf8_strlen() Reported-by: Karl Robillard Signed-off-by: Steve Bennett --- diff --git a/utf8.h b/utf8.h index 11dc51b..9537939 100644 --- a/utf8.h +++ b/utf8.h @@ -12,7 +12,7 @@ #include /* No utf-8 support. 1 byte = 1 char */ -#define utf8_strlen(S, B) (B) < 0 ? (int)strlen(S) : (B) +#define utf8_strlen(S, B) ((B) < 0 ? (int)strlen(S) : (B)) #define utf8_tounicode(S, CP) (*(CP) = (unsigned char)*(S), 1) #define utf8_index(C, I) (I) #define utf8_charlen(C) 1