From 71a603ea321533d30ad4f89afe844be835dae38e Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sat, 29 Jun 2002 18:46:49 +0000 Subject: [PATCH] Fix some 8bit issues with IRCG nickname encoding and Change the underlying interface of smart_str to accept unsigned char. --- ext/standard/php_smart_str.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/php_smart_str.h b/ext/standard/php_smart_str.h index d05e615fe7..63a0b1b527 100644 --- a/ext/standard/php_smart_str.h +++ b/ext/standard/php_smart_str.h @@ -49,13 +49,13 @@ #define smart_str_append_long(dest, val) smart_str_append_long_ex(dest, val, 0) #define smart_str_append_unsigned(dest, val) smart_str_append_unsigned_ex(dest, val, 0) -static inline void smart_str_appendc_ex(smart_str *dest, char c, int what) +static inline void smart_str_appendc_ex(smart_str *dest, unsigned char c, int what) { size_t newlen; smart_str_alloc(dest, 1, what); dest->len = newlen; - dest->c[dest->len - 1] = c; + ((unsigned char *) dest->c)[dest->len - 1] = c; } -- 2.40.0