Commit bfc66883 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

Call Write on the delimited text writer

This ensures it is called before anything is deleted. Also, assure
the data array is never deleted by accounting for <= rather than
< causing an off-by-one error in the initial allocation...

Change-Id: I8a9e6f6ab00b93eeec391317d61e3ebc88880233
parent 9081c128
...@@ -255,7 +255,7 @@ int main(int argc, char *argv[]) ...@@ -255,7 +255,7 @@ int main(int argc, char *argv[])
int startSeq = args.Start; int startSeq = args.Start;
int endSeq = args.End; int endSeq = args.End;
results->SetNumberOfRows(endSeq - startSeq); results->SetNumberOfRows(endSeq - startSeq + 1);
int row = 0; int row = 0;
for (int i = startSeq; i <= endSeq; ++i) for (int i = startSeq; i <= endSeq; ++i)
{ {
...@@ -279,6 +279,7 @@ int main(int argc, char *argv[]) ...@@ -279,6 +279,7 @@ int main(int argc, char *argv[])
writer->SetInputData(results.Get()); writer->SetInputData(results.Get());
writer->SetFileName(args.FileName.c_str()); writer->SetFileName(args.FileName.c_str());
writer->Update(); writer->Update();
writer->Write();
return 0; return 0;
} }
Markdown is supported
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