--- 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;
+ }
}
/*
|