--- yoda/techmodel/CalibTrailerReader.cpp 2006/02/07 10:43:06 5.3 +++ yoda/techmodel/CalibTrailerReader.cpp 2006/09/29 10:19:21 6.3 @@ -1,7 +1,7 @@ /** @file * $Author: kusanagi $ - * $Date: 2006/02/07 10:36:43 $ - * $Revision: 5.2 $ + * $Date: 2006/05/30 19:10:03 $ + * $Revision: 6.2 $ * * Implementation of the CalibTrailerReader class. */ @@ -47,11 +47,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 CalibTrailer Packet "); + calibTrailer->calibTrailerData = new TArrayC(length, subData); }