]> granicus.if.org Git - php/commitdiff
Corrected previous patch
authorIlia Alshanetsky <iliaa@php.net>
Fri, 26 May 2006 01:55:26 +0000 (01:55 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 26 May 2006 01:55:26 +0000 (01:55 +0000)
ext/wddx/wddx.c

index ef3cea3f4219cc293932fe1537e1dd63fbdee77c..870298895ca39e9b3788bd4b65afc042d91b3a1c 100644 (file)
 #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;