From 5f686d5179d6a23a37378550b8c1122453d240c1 Mon Sep 17 00:00:00 2001 From: Attila Veghelyi Date: Tue, 25 Jun 2024 20:25:31 +0200 Subject: Stop the process when device ID is unknown --- progP24.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'progP24.c') diff --git a/progP24.c b/progP24.c index 435b931..d6e86b5 100644 --- a/progP24.c +++ b/progP24.c @@ -346,7 +346,7 @@ struct ID24{ {0x488B,"24FJ128GC008"}, }; -void PIC24_ID(int id) +static bool PIC24_ID(int id) { char s[64]; int i; @@ -355,10 +355,11 @@ void PIC24_ID(int id) strcpy(s,PIC24LIST[i].device); strcat(s,"\r\n"); PrintMessage(s); - return; + return true; } } PrintMessage(strings[S_nodev]); //"Unknown device\r\n"); + return false; } void DisplayCODE24F(int dim){ @@ -644,7 +645,7 @@ void Read24Fx(int dim,int dim2,int options,int appIDaddr,int executiveArea){ for(z+=3;bufferI[z]!=REGOUT&&z