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:
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user