msxml3: Ignore nanoseconds in xmlnode_get_nodeTypedValue.

This commit is contained in:
Piotr Caban 2009-11-18 19:02:15 +01:00 committed by Alexandre Julliard
parent f4f7198610
commit 5f26c60982
2 changed files with 3 additions and 12 deletions

View File

@ -999,16 +999,7 @@ inline HRESULT VARIANT_from_xmlChar(xmlChar *str, VARIANT *v, BSTR type)
if(*p == '.')
{
int ms;
p++;
ms = (*(p++) - '0') * 10;
if(isdigitW(*p)) ms += *(p++) - '0';
ms *= 10;
if(isdigitW(*p)) ms += *(p++) - '0';
st.wMilliseconds = ms;
while(isdigitW(*p)) p++;
}
}

View File

@ -4103,7 +4103,7 @@ static void test_NodeTypeValue(void)
hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v);
ok(hr == S_OK, "ret %08x\n", hr );
ok(V_VT(&v) == VT_DATE, "incorrect type\n");
double_eq(40135.13996666666, V_DATE(&v));
double_eq(40135.13996527778, V_DATE(&v));
VariantClear( &v );
IXMLDOMNode_Release(pNode);
@ -4142,7 +4142,7 @@ static void test_NodeTypeValue(void)
hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v);
ok(hr == S_OK, "ret %08x\n", hr );
ok(V_VT(&v) == VT_DATE, "incorrect type\n");
double_eq(0.581392511574074, V_DATE(&v));
double_eq(0.5813888888888888, V_DATE(&v));
VariantClear( &v );
IXMLDOMNode_Release(pNode);
@ -4155,7 +4155,7 @@ static void test_NodeTypeValue(void)
hr = IXMLDOMNode_get_nodeTypedValue(pNode, &v);
ok(hr == S_OK, "ret %08x\n", hr );
ok(V_VT(&v) == VT_DATE, "incorrect type\n");
double_eq(1.112513078703703, V_DATE(&v));
double_eq(1.112511574074074, V_DATE(&v));
VariantClear( &v );
IXMLDOMNode_Release(pNode);