Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ben Boeckel
Xdmf
Commits
ccc55154
Commit
ccc55154
authored
Feb 22, 2008
by
Jerry Clarke
Browse files
InputString has no trailing \0 .. copy and added one
parent
8a577c2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
vtk/vtkXdmfReader.cxx
View file @
ccc55154
...
...
@@ -85,7 +85,7 @@
#define USE_IMAGE_DATA // otherwise uniformgrid
vtkStandardNewMacro
(
vtkXdmfReader
);
vtkCxxRevisionMacro
(
vtkXdmfReader
,
"1.3
2
"
);
vtkCxxRevisionMacro
(
vtkXdmfReader
,
"1.3
3
"
);
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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment