fsparser: don't try to analyze header after then end of header area
This commit is contained in:
parent
41b4a79af1
commit
b4fe045060
|
|
@ -50,6 +50,7 @@ int FsParser::parseHeader()
|
|||
int ret = 0;
|
||||
string buffer;
|
||||
int line_index = 0;
|
||||
bool in_header = true;
|
||||
|
||||
istringstream lineStream(_raw_data);
|
||||
|
||||
|
|
@ -67,6 +68,9 @@ int FsParser::parseHeader()
|
|||
*/
|
||||
_lstRawData.push_back(buffer);
|
||||
|
||||
if (!in_header)
|
||||
continue;
|
||||
|
||||
uint8_t c = bitToVal(buffer.substr(0, 8).c_str(), 8);
|
||||
uint8_t key = c & 0x7F;
|
||||
uint64_t val = bitToVal(buffer.c_str(), buffer.size());
|
||||
|
|
@ -112,6 +116,7 @@ int FsParser::parseHeader()
|
|||
break;
|
||||
case 0x3B: /* last header line with crc and cfg data length */
|
||||
/* documentation issue */
|
||||
in_header = false;
|
||||
uint8_t crc;
|
||||
crc = 0x01 & (val >> 23);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue