From 64631ea08f3a3a0243164e18f7e7398acabbcb18 Mon Sep 17 00:00:00 2001 From: Oliver Walter Date: Sun, 25 Feb 2024 23:49:05 +0100 Subject: [PATCH] fixed bug in CanDataTask the counter of devices was not resetting. leading to a memory overlow when called multible times. --- Application/Tasks/CanDataTask.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Tasks/CanDataTask.c b/Application/Tasks/CanDataTask.c index aa91836..18b0b33 100644 --- a/Application/Tasks/CanDataTask.c +++ b/Application/Tasks/CanDataTask.c @@ -131,7 +131,7 @@ void DataClbk_cls_device_ResponseList(void* msg, uint32_t length) { cls_device_ResponseList list; extern uint8_t gCLS_DEVICE_ADDRESS; void DataClbk_cls_device_RequestList(void* msg, uint32_t length) { - + memset(&list,0,sizeof(list)); // add yourself list.devices[list.devices_count].available = true; list.devices[list.devices_count].canid = GENERATE_CLS_ADDRESS(CLS_CODE_STATUS, gCLS_DEVICE_ADDRESS, CLS_CH_STA_HEATBEAT);