From: Ilia Alshanetsky Date: Fri, 26 May 2006 01:55:26 +0000 (+0000) Subject: Corrected previous patch X-Git-Tag: php-4.4.3~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3ddd1b71dc93a64c92e0c8707e94469ca684129;p=php Corrected previous patch --- diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index ef3cea3f42..870298895c 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -22,10 +22,6 @@ #include "config.h" #endif -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include "php.h" #include "php_wddx.h" @@ -408,9 +404,9 @@ static void php_wddx_serialize_string(wddx_packet *packet, zval *var) break; default: - if (iscntrl((int)*(unsigned char *)p)) { + if (iscntrl((int)*(unsigned char *)p) || (int)*(unsigned char *)p >= 127) { FLUSH_BUF(); - sprintf(control_buf, WDDX_CHAR, *p); + sprintf(control_buf, WDDX_CHAR, (int)*(unsigned char *)p); php_wddx_add_chunk(packet, control_buf); } else buf[l++] = *p;