OSSP CVS Repository

ossp - Difference in ossp-pkg/xds/xds_engine_xml.c versions 1.11 and 1.12
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/xds/xds_engine_xml.c 1.11 -> 1.12

--- xds_engine_xml.c     2003/02/17 12:36:02     1.11
+++ xds_engine_xml.c     2004/09/12 17:20:36     1.12
@@ -434,14 +434,17 @@
 int xml_decode_float(xds_t *xds, void *engine_context,
                       void *buffer, size_t buffer_size,
                       size_t *used_buffer_size, va_list *args)
-    {
+{
+    int size;
     xds_init_decoding_engine(7 + 8 + 1);
     if (sscanf(buffer, "<float>%f</float>%n",
-               va_arg(*args, float*), used_buffer_size) != 1)
+               va_arg(*args, float*), &size) != 1)
         return XDS_ERR_TYPE_MISMATCH;
-    else
+    else {
+        *used_buffer_size = size;
         return XDS_OK;
     }
+}
 
 /*
  * Encode/decode double-precision floating point values.
@@ -464,12 +467,15 @@
                       void *buffer, size_t buffer_size,
                       size_t *used_buffer_size, va_list *args)
 {
+    int size;
     xds_init_decoding_engine(8 + 9 + 1);
     if (sscanf(buffer, "<double>%lf</double>%n",
-               va_arg(*args, double*), used_buffer_size) != 1)
+               va_arg(*args, double*), &size) != 1)
         return XDS_ERR_TYPE_MISMATCH;
-    else
+    else {
+        *used_buffer_size = size;
         return XDS_OK;
+    }
 }
 
 /*

CVSTrac 2.0.1