From 030136d20ecc9384f2245d9dc814afa6dc10e428 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Sat, 28 Jun 2025 21:08:49 -0400 Subject: [PATCH] Improving sql_gooddata --- lib/devsql.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/devsql.c b/lib/devsql.c index 30d2fd5..9bf939b 100644 --- a/lib/devsql.c +++ b/lib/devsql.c @@ -510,13 +510,16 @@ phase=0; proceed=true; while (proceed==true) { switch (phase) { - case 0 : //do we have a string - if ((key==(char *)0)||(strlen(key)==0)) - key="NULL"; //no, force a 'NULL' string. + case 0 : //do we have a string to encode + if ((key==(char *)0)||(strlen(key)==0)) { + gooddata=strdup("NULL"); //no, force a 'NULL' string. + phase=999; + } break; case 1 : //checking the key encoding if ((sqlkey=sql_checkencoding(key))==(char *)0) { (void) rou_alert(0,"%s dbkey <%s> encoding is wrong (config?)",OPEP,key); + gooddata=strdup("NULL"); //Let assum NULL phase=999; //trouble trouble } break; -- 2.47.3