Skip to content

Commit a4b4526

Browse files
author
Iain Bancarz
committed
Do not store input path in 'filename' variable
1 parent 1a2f279 commit a4b4526

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Sim.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ using namespace std;
4444
Sim::Sim(void)
4545
{
4646
version=0;
47+
inPath = "";
4748
filename = "";
4849
errorMsg="";
4950
}
5051

5152
void Sim::open(string fname)
5253
{
53-
this->filename = fname;
54+
inPath = fname;
5455
char *f = new char[fname.length()+1];
5556
strcpy(f, fname.c_str());
5657
openLowLevel(f);

Sim.h

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class Sim {
9191
private:
9292
ostream *outfile;
9393
ofstream fout;
94+
string inPath;
9495
FILE *inFile; // low-level file access for greater speed
9596
map<string,long> sampleIndex;
9697
void __openout(ostream &f);

0 commit comments

Comments
 (0)