- Timestamp:
- 03/09/16 15:40:33 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Corsika7500Compatibility/mcorsika/MCorsikaFormat.cc
r10213 r18455 57 57 } 58 58 59 char *buffer = new char[ 5];60 memset(buffer, 0, 5);61 fileIn->read(buffer, 4);62 fileIn->seekg(- 4, ios::cur);59 char *buffer = new char[9]; 60 memset(buffer, 0, 9); 61 fileIn->read(buffer, 8); 62 fileIn->seekg(-8, ios::cur); 63 63 64 64 if (strcmp(buffer, "RUNH") == 0) … … 66 66 delete [] buffer; 67 67 return new MCorsikaFormatRaw(fileIn); 68 } 69 else if(strcmp(&buffer[4], "RUNH") == 0) 70 { 71 fileIn->seekg(4, ios::cur); 72 delete[] buffer; 73 return new MCorsikaFormatRaw(fileIn, true); 68 74 } 69 75 … … 159 165 for (int i=1; i<22; i++) 160 166 { 161 fIn->seekg(-i*273*4, ios::end); 167 if(fFortranRaw) 168 fIn->seekg(-i*273*4-4, ios::end); 169 else 170 fIn->seekg(-i*273*4, ios::end); 162 171 163 172 char runh[5]="\0\0\0\0";
Note:
See TracChangeset
for help on using the changeset viewer.