This commit is contained in:
iceman1001 2024-01-02 21:55:04 +01:00
parent 035572798e
commit b6a448e391
2 changed files with 6 additions and 8 deletions

View file

@ -93,21 +93,19 @@ static uint8_t calc_pos(const uint8_t *d) {
// Copy an existing buffer into client trace buffer
// I think this is cleaner than further globalizing gs_trace, and may lend itself to more modularity later?
bool ImportTraceBuffer(uint8_t *trace_src, uint16_t trace_len)
{
if (trace_len == 0 || trace_src == NULL) return(false);
bool ImportTraceBuffer(uint8_t *trace_src, uint16_t trace_len) {
if (trace_len == 0 || trace_src == NULL) return (false);
if (gs_trace) {
free(gs_trace);
gs_traceLen = 0;
}
gs_trace = calloc(trace_len, sizeof(uint8_t));
if (gs_trace == NULL)
{
return(false);
if (gs_trace == NULL) {
return (false);
}
memcpy(gs_trace, trace_src, trace_len);
gs_traceLen = trace_len;
return(true);
return (true);
}
static uint8_t extract_uid[10] = {0};

View file

@ -12160,6 +12160,6 @@
"metadata": {
"commands_extracted": 703,
"extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2024-01-01T20:49:58"
"extracted_on": "2024-01-02T20:54:40"
}
}