mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024852: Crash on storage of an Ocaf document in XML file format
Blanks are removed. A check is implemented to correct a GUID in case of presence of the blanks. Test case for issues CR24852
This commit is contained in:
@@ -481,7 +481,15 @@ Standard_Boolean CDF_Application::FindReaderFromFormat(const TCollection_Extende
|
||||
ResourceName+=".RetrievalPlugin";
|
||||
|
||||
if(UTL::Find(Resources(),ResourceName)) {
|
||||
thePluginId=UTL::GUID(UTL::Value(Resources(),ResourceName));
|
||||
// Get GUID as a string.
|
||||
TCollection_ExtendedString strPluginId = UTL::Value(Resources(),ResourceName);
|
||||
|
||||
// If the GUID (as a string) contains blanks, remove them.
|
||||
if (strPluginId.Search(' ') != -1)
|
||||
strPluginId.RemoveAll(' ');
|
||||
|
||||
// Convert to GUID.
|
||||
thePluginId=UTL::GUID(strPluginId);
|
||||
return Standard_True;
|
||||
}
|
||||
return Standard_False;
|
||||
|
Reference in New Issue
Block a user