From 84faf16765dc2621ba367edc54d69ca9623dc02f Mon Sep 17 00:00:00 2001 From: supowang Date: Fri, 29 May 2020 15:30:10 +0800 Subject: [PATCH] Update RHF76.c fix bug for lora incoming buffer --- devices/rhf76_lora/RHF76.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/devices/rhf76_lora/RHF76.c b/devices/rhf76_lora/RHF76.c index 4cbdfcab..567d8cb8 100644 --- a/devices/rhf76_lora/RHF76.c +++ b/devices/rhf76_lora/RHF76.c @@ -461,7 +461,15 @@ __STATIC__ void rhf76_incoming_data_process(void) if (data == '"') { break; } - incoming_data_buffer[ret++] = data; + if(ret<128) + { + incoming_data_buffer[ret++] = data; + } + else + { + printf(" ERR:incomming data is big ,please give more space for incoming_data_buffer\n"); + } + } printf("rhf76_incoming_data_process %d: %s\n", ret, incoming_data_buffer);