Skip to content

Commit 92fbcc3

Browse files
fix issue with corrupt timestamps
1 parent 07a14d9 commit 92fbcc3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libs/mavlink.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20223,6 +20223,8 @@ MAVLink20Processor.prototype.trimFile = function (start, end) {
2022320223
// The 8 bytes preceding the mavlink message are actually a very useful timestamp saved by the GCS!
2022420224
let slice = this.buf.slice(offsets[0]-8, offsets[0])
2022520225
let timestamp = new Uint64BE(slice)/1000 - this.startTime
20226+
// arbitrary huge number we'll cap our results at to cope with corrupt timestamps
20227+
if (timestamp > 21796250065390) continue
2022620228
if (timestamp > start && startOffset === null)
2022720229
{
2022820230
startOffset = offsets[0]

0 commit comments

Comments
 (0)