1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0030101: Application Framework - A mistake reading a RealArray attribute with too small value

A case of reading of a very small value was skipped, for example: 2.1219957909652723e-314.
Fixed in XmlMDataStd_RealArrayDriver.cxx and XmlMDataStd_RealListDriver.cxx

// A test file bug29452.xml is extended to check this skipped case.
This commit is contained in:
vro
2019-10-14 10:29:54 +03:00
committed by bugmaster
parent d850414af1
commit 00cdefc7a2
3 changed files with 14 additions and 2 deletions

View File

@@ -128,8 +128,12 @@ Standard_Boolean XmlMDataStd_RealArrayDriver::Paste
" for RealArray attribute as \"")
+ aValueStr + "\"";
myMessageDriver->Send (aMessageString, Message_Warning);
// skip the first space, if exists
while (*aValueStr != 0 && IsSpace (*aValueStr))
++aValueStr;
// skip to the next space separator
while (*aValueStr != 0 && ! IsSpace (*aValueStr)) ++aValueStr;
while (*aValueStr != 0 && ! IsSpace (*aValueStr))
++aValueStr;
}
aRealArray->SetValue(ind, aValue);
}

View File

@@ -126,8 +126,12 @@ Standard_Boolean XmlMDataStd_RealListDriver::Paste(const XmlObjMgt_Persistent&
" for RealList attribute as \"")
+ aValueStr + "\"";
myMessageDriver->Send(aMessageString, Message_Warning);
// skip the first space, if exists
while (*aValueStr != 0 && IsSpace (*aValueStr))
++aValueStr;
// skip to the next space separator
while (*aValueStr != 0 && ! IsSpace (*aValueStr)) ++aValueStr;
while (*aValueStr != 0 && !IsSpace (*aValueStr))
++aValueStr;
}
aRealList->Append(aValue);
}