Commit ccc55154 authored by Jerry Clarke's avatar Jerry Clarke
Browse files

InputString has no trailing \0 .. copy and added one

parent 8a577c2a
......@@ -85,7 +85,7 @@
#define USE_IMAGE_DATA // otherwise uniformgrid
vtkStandardNewMacro(vtkXdmfReader);
vtkCxxRevisionMacro(vtkXdmfReader, "1.32");
vtkCxxRevisionMacro(vtkXdmfReader, "1.33");
vtkCxxSetObjectMacro(vtkXdmfReader,Controller,vtkMultiProcessController);
......@@ -1441,7 +1441,8 @@ int vtkXdmfReader::RequestDataObject(vtkInformationVector *outputVector)
// Reading from File or String
if(this->GetReadFromInputString()){
cout << "vtkXdmfReader Reading from String" << endl;
char InputTxt[this->InputStringLength + 1];
if ( !this->DOM ){
this->DOM = new XdmfDOM();
}
......@@ -1449,7 +1450,9 @@ int vtkXdmfReader::RequestDataObject(vtkInformationVector *outputVector)
this->Internals->DataItem = new XdmfDataItem();
this->Internals->DataItem->SetDOM(this->DOM);
}
this->DOM->Parse(this->GetInputString());
memcpy(InputTxt, this->GetInputString(), this->InputStringLength);
InputTxt[this->InputStringLength] = 0;
this->DOM->Parse(InputTxt);
this->GridsModified = 1;
}else{
// Parse the file...
......@@ -1858,7 +1861,9 @@ int vtkXdmfReaderInternal::RequestGridData(
vtkDebugWithObjectMacro(this->Reader,
"Reading Heavy Data for " << xdmfGrid->GetName());
#ifndef XDMF_NO_MPI
xdmfGrid->SetDsmBuffer(this->DsmBuffer);
#endif
xdmfGrid->Update();
// True for all 3d datasets except unstructured grids
......@@ -2600,7 +2605,9 @@ int vtkXdmfReaderInternal::RequestGridData(
vtkDebugWithObjectMacro(this->Reader,
"Topology class: "
<< xdmfGrid->GetTopology()->GetClassAsString());
#ifndef XDMF_NO_MPI
this->DataItem->SetDsmBuffer(this->DsmBuffer);
#endif
if(xdmfGrid->GetTopology()->GetClass() != XDMF_UNSTRUCTURED)
{
XdmfDataDesc* ds = grid->DataDescription;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment