--- yoda/techmodel/InitHeaderReader.cpp 2006/02/07 17:11:09 6.0 +++ yoda/techmodel/InitHeaderReader.cpp 2006/09/29 10:19:23 6.3 @@ -1,7 +1,7 @@ /** @file * $Author: kusanagi $ - * $Date: 2006/02/04 12:37:45 $ - * $Revision: 5.1 $ + * $Date: 2006/05/30 19:10:03 $ + * $Revision: 6.2 $ * * Implementation of the InitHeaderReader class. */ @@ -26,7 +26,7 @@ */ std::string InitHeaderReader::GetVersionInfo(void) const { return - "$Header: /home/cvsmanager/yoda/techmodel/InitHeaderReader.cpp,v 5.1 2006/02/04 12:37:45 kusanagi Exp $\n"; + "$Header: /afs/ba.infn.it/user/pamela/src/CVS/yoda/techmodel/InitHeaderReader.cpp,v 6.2 2006/05/30 19:10:03 kusanagi Exp $\n"; } /** @@ -53,12 +53,12 @@ UINT16 subCRC; //calculated CRC of the data UINT16 readCRC; //CRC read from the end of the subpacket long int length = dataLength - 2; //the block of data - + memset(subData, 0, dataLength*sizeof(char)); InputFile->read(subData, sizeof(subData)); subCRC = CM_Compute_CRC16(0, (UINT8*)subData, length); readCRC = (((UINT16)(subData[dataLength - 2]<<8))&0xFF00) + (((UINT16)subData[dataLength - 1])&0x00FF); if (subCRC != readCRC) throw WrongCRCException(" Wrong CRC for InitHeader Packet "); - + initHeader->initHeaderData = new TArrayC(length, subData); }