]> granicus.if.org Git - php/commitdiff
Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
authorIlia Alshanetsky <iliaa@php.net>
Tue, 1 Jun 2004 20:16:06 +0000 (20:16 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 1 Jun 2004 20:16:06 +0000 (20:16 +0000)
200-210 range).
Patch by: fernando dot nemec at folha dot com dot br

ext/xmlrpc/libxmlrpc/xml_element.c

index 53fcd74c2da70be1c04a47c4668f581149d9ec43..5fee23959cfcb11a55d3d4a336c072d313ae7bc4 100644 (file)
@@ -44,6 +44,9 @@ static const char rcsid[] = "#(@) $Id$";
  *   06/2000
  * HISTORY
  *   $Log$
+ *   Revision 1.5  2003/12/16 21:00:21  sniper
+ *   Fix some compile warnings (patch by Joe Orton)
+ *
  *   Revision 1.4  2002/11/26 23:01:16  fmk
  *   removing unused variables
  *
@@ -265,10 +268,9 @@ static int create_xml_escape(char *pString, unsigned char c)
     pString[counter++] = c / 100 + '0';
     c = c % 100;
   }
-  if(c >= 10) {
-    pString[counter++] = c / 10 + '0';
-    c = c % 10;
-  }
+  pString[counter++] = c / 10 + '0';
+  c = c % 10;
+
   pString[counter++] = c + '0';
   pString[counter++] = ';';
   return counter;