Browse Source

fix obviously wrong check in decode_packet()

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
tags/v1.1
Oliver Hartkopp 4 years ago
parent
commit
b4663c9155
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      drmdecrypt.c

+ 2
- 2
drmdecrypt.c View File

@@ -245,13 +245,13 @@ int decode_packet(unsigned char *data, unsigned char *outdata)
245 245
    trace(TRC_DEBUG, "Contains payload      : 0x%x", data[3] & 0x10);
246 246
    trace(TRC_DEBUG, "Continuity counter    : 0x%x", data[3] & 0x0f);
247 247
 
248
-   if((data[3] & 0x20) == 0x01)
248
+   if(data[3] & 0x20)
249 249
 	   trace(TRC_DEBUG, "Adaptation Field length: 0x%x", data[4]+1);
250 250
 
251 251
    offset=4;
252 252
 
253 253
    /* skip adaption field */
254
-   if((data[3] & 0x20) == 0x01)
254
+   if(data[3] & 0x20)
255 255
       offset += (data[4]+1);
256 256
 
257 257
    /* remove scrambling bits */

Loading…
Cancel
Save