From: Sascha Schumann Date: Sat, 29 Jun 2002 18:46:49 +0000 (+0000) Subject: Fix some 8bit issues with IRCG nickname encoding and X-Git-Tag: php-4.3.0dev_zend2_alpha2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71a603ea321533d30ad4f89afe844be835dae38e;p=php Fix some 8bit issues with IRCG nickname encoding and Change the underlying interface of smart_str to accept unsigned char. --- 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; }