aboutsummaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-09-26 07:38:05 +1000
committerSteve Bennett <steveb@workware.net.au>2011-09-26 07:38:05 +1000
commit06147741e962a98b6d9bbbe37e2e80ffffb36b82 (patch)
treeaed30410787bb0d437d4a85a1a6a1954feb8a6f8 /utf8.h
parentc207b1b8b0b149c2ade569ef47e555f2ac344b2c (diff)
downloadjimtcl-06147741e962a98b6d9bbbe37e2e80ffffb36b82.zip
jimtcl-06147741e962a98b6d9bbbe37e2e80ffffb36b82.tar.gz
jimtcl-06147741e962a98b6d9bbbe37e2e80ffffb36b82.tar.bz2
Missing parens in non-utf8 version of utf8_strlen
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.h b/utf8.h
index dfb8b08..9ada93f 100644
--- a/utf8.h
+++ b/utf8.h
@@ -21,7 +21,7 @@ int utf8_fromunicode(char *p, unsigned short uc);
#include <ctype.h>
/* No utf-8 support. 1 byte = 1 char */
-#define utf8_strlen(S, B) (B) < 0 ? strlen(S) : (B)
+#define utf8_strlen(S, B) ((B) < 0 ? strlen(S) : (B))
#define utf8_tounicode(S, CP) (*(CP) = (unsigned char)*(S), 1)
#define utf8_upper(C) toupper(C)
#define utf8_lower(C) tolower(C)