Skip to content

Commit 063e4df

Browse files
committed
Fix warning
1 parent bd5824e commit 063e4df

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/CAMIO.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,11 +2334,18 @@ std::vector<byte_type> CAMIO::GenerateBlockHeader(CAMBlock block, size_t loc, ui
23342334
0x03E6, // 0x28 16 Addresss of entries in block
23352335
0x0009, // 0x2A 17 Always 9
23362336
0x0000, // 0x2C 18
2337-
static_cast<uint16_t>(values[4] + values[11] * values[12] + values[13]) // 0x2E 19 Computed size of block
2338-
};
2337+
static_cast<uint16_t>(sec_header_length + numRec * static_cast<uint16_t>(RecordSize::ACQP) + 0x02EA) // 0x2E 19 Computed size of block
2338+
};
23392339
std::vector<uint16_t> temp = { values[4] , values[11] , values[12] , values[13] , values[17]};
23402340
// Modify values based on block type
23412341
switch (block) {
2342+
case CAMBlock::ACQP:
2343+
case CAMBlock::GEOM:
2344+
case CAMBlock::DISP:
2345+
case CAMBlock::PEAK:
2346+
// No action
2347+
break;
2348+
23422349
case CAMBlock::PROC:
23432350
values[0] = 0x0100;
23442351
values[1] = static_cast<uint16_t>(BlockSize::PROC);
@@ -2460,7 +2467,7 @@ std::vector<byte_type> CAMIO::GenerateBlockHeader(CAMBlock block, size_t loc, ui
24602467
}
24612468
break;
24622469

2463-
2470+
24642471
}
24652472

24662473
// Copy in the block code

0 commit comments

Comments
 (0)