From 6c739904c7d3b31dc59ce65ded958339d1b449f0 Mon Sep 17 00:00:00 2001 From: Roshan Bangar Date: Mon, 20 Nov 2023 10:31:19 +0530 Subject: [PATCH] Solved the invalid write value on CTS char --- nimble/host/services/cts/src/ble_svc_cts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nimble/host/services/cts/src/ble_svc_cts.c b/nimble/host/services/cts/src/ble_svc_cts.c index 63304cbe6..1c9f8c889 100644 --- a/nimble/host/services/cts/src/ble_svc_cts.c +++ b/nimble/host/services/cts/src/ble_svc_cts.c @@ -105,8 +105,7 @@ ble_svc_cts_chr_write(struct os_mbuf *om, uint16_t min_len, int ble_svc_cts_curr_time_validate(struct ble_svc_cts_curr_time curr_time) { if(curr_time.et_256.d_d_t.day_of_week > 7 || - (curr_time.et_256.d_d_t.d_t.year < 1582 && - curr_time.et_256.d_d_t.d_t.year != 0 ) || + (curr_time.et_256.d_d_t.d_t.year < 1582)|| curr_time.et_256.d_d_t.d_t.year > 9999 || curr_time.et_256.d_d_t.d_t.month > 12 || curr_time.et_256.d_d_t.d_t.day > 31 ||