summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-05-26 01:55:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-05-26 01:55:26 +0000
commitb3ddd1b71dc93a64c92e0c8707e94469ca684129 (patch)
tree18102e3b6623ed034df8726aeb3392c2218db7c5
parent0063ffc124d65b20705a3da3f09f85bf773355e5 (diff)
downloadphp-git-b3ddd1b71dc93a64c92e0c8707e94469ca684129.tar.gz
Corrected previous patch
-rw-r--r--ext/wddx/wddx.c8
1 files changed, 2 insertions, 6 deletions
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;