Use relative instead of absolute offests.
Although the settings sample will most likely always be located at the start, it's better to be on the safe side and use an offset relative to the start of the settings sample. Reported-By: Nick Shore <support@mac-dive.com>
This commit is contained in:
parent
56e2dec726
commit
0e11bad6c0
@ -212,8 +212,8 @@ diverite_nitekq_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callbac
|
||||
case 0x01: // Settings
|
||||
if (offset + 27 > size)
|
||||
return DC_STATUS_DATAFORMAT;
|
||||
metric = (data[0x10] & 0x04) >> 2;
|
||||
interval = data[0x11];
|
||||
metric = (data[offset + 0x10] & 0x04) >> 2;
|
||||
interval = data[offset + 0x11];
|
||||
offset += 27;
|
||||
break;
|
||||
case 0x02: // OC Samples
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user