From: Jean-Marc Pigeon (Delson) Date: Sun, 29 Jun 2025 01:08:49 +0000 (-0400) Subject: Improving sql_gooddata X-Git-Tag: tag-0.11~25 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=030136d20ecc9384f2245d9dc814afa6dc10e428;p=jmp%2Fmailleur Improving sql_gooddata --- 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;