- in.read(header->flowChars, header->numFlowsPerRead);
- tempBuf = buffer;
- if (tempBuf.length() > header->numFlowsPerRead) { tempBuf = tempBuf.substr(0, header->numFlowsPerRead); strcpy(header->flowChars, tempBuf.c_str()); }
+ buffer = new char(header->numFlowsPerRead);
+ //cout << "here" << endl;
+ //in.read(header->flowChars, header->numFlowsPerRead);
+ in.read(buffer, header->numFlowsPerRead);
+ memcpy(header->flowChars, buffer, header->numFlowsPerRead);
+ delete[] buffer;
+ //cout << "here" << endl;
+ //string tempBuf1 = header->flowChars;
+ //cout << "here " << in.tellg() << endl;
+ //if (tempBuf1.length() > header->numFlowsPerRead) { tempBuf1 = tempBuf1.substr(0, header->numFlowsPerRead); strcpy(header->flowChars, tempBuf1.c_str()); }