Skip to content

Commit a2a5c27

Browse files
authored
Merge pull request #163 from loebl/fix-local-timestamp-parsing
Correct local timestamp decoding
2 parents 3c4d346 + d8091e8 commit a2a5c27

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

Src/msgDecoder.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -207,17 +207,15 @@ static bool _handleTS( struct ITMPacket *packet, struct TSMsg *decoded )
207207

208208
if ( packet->len > 2 )
209209
{
210-
stamp |= ( packet->d[2] ) << 7;
211-
212-
if ( packet->len > 3 )
213-
{
214-
stamp |= ( packet->d[3] & 0x7F ) << 14;
215-
216-
if ( packet->len > 4 )
217-
{
218-
stamp |= ( packet->d[4] & 0x7f ) << 21;
219-
}
220-
}
210+
stamp |= ( packet->d[2] & 0x7F ) << 7;
211+
}
212+
if ( packet->len > 3 )
213+
{
214+
stamp |= ( packet->d[3] & 0x7F ) << 14;
215+
}
216+
if ( packet->len > 4 )
217+
{
218+
stamp |= ( packet->d[4] & 0x7f ) << 21;
221219
}
222220
}
223221

0 commit comments

Comments
 (0)