From 249d3e7d1e6ffa6018e1984536394040dc2e786c Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 29 Jan 2021 12:04:19 +0100 Subject: [PATCH] text --- CHANGELOG.md | 2 ++ client/src/wiegand_formatutils.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffd6aa4cc..13743da0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] + - Changed `wiegand encode` - format param is now optional, w/o it will try encode all formats (@iceman1001) + - Fix cppchecker warnings (@iceman1001) - Added `trace list -t mf` - now can use external dictionary keys file - Added support for bidirectional communication for `lf em 4x50 sim` (@tharexde) - Change `PLATFORM=PM3OTHER` to `PLATFORM=PM3GENERIC` (@iceman1001) diff --git a/client/src/wiegand_formatutils.c b/client/src/wiegand_formatutils.c index 3879e616e..212a30151 100644 --- a/client/src/wiegand_formatutils.c +++ b/client/src/wiegand_formatutils.c @@ -121,6 +121,12 @@ bool set_nonlinear_field(wiegand_message_t *data, uint64_t value, uint8_t numBit } static uint8_t get_length_from_header(wiegand_message_t *data) { +/** + * detect if message has "preamble" / "sentinel bit" + * + */ + + uint8_t len = 0; uint32_t hfmt = 0; // for calculating card length