data: fix xml_string empty node return value

main
Dominik Madarász 2023-11-22 18:07:18 +01:00
parent 85bcfaf145
commit 590d2f70c8
3 changed files with 3 additions and 3 deletions

View File

@ -354828,7 +354828,7 @@ static void *xml_path(struct xml *node, char *path, int down) {
const char *(xml_string)(char *key) { const char *(xml_string)(char *key) {
struct xml *node = xml_path(*array_back(xml_docs), key, 0); struct xml *node = xml_path(*array_back(xml_docs), key, 0);
if( !node ) return "(null)"; if( !node ) return "";
if( strchr(key, '@') ) return (const char *)node; if( strchr(key, '@') ) return (const char *)node;
if( strchr(key, '$') ) return (const char *)node; if( strchr(key, '$') ) return (const char *)node;
return ""; return "";

View File

@ -153,7 +153,7 @@ static void *xml_path(struct xml *node, char *path, int down) {
const char *(xml_string)(char *key) { const char *(xml_string)(char *key) {
struct xml *node = xml_path(*array_back(xml_docs), key, 0); struct xml *node = xml_path(*array_back(xml_docs), key, 0);
if( !node ) return "(null)"; if( !node ) return "";
if( strchr(key, '@') ) return (const char *)node; if( strchr(key, '@') ) return (const char *)node;
if( strchr(key, '$') ) return (const char *)node; if( strchr(key, '$') ) return (const char *)node;
return ""; return "";

View File

@ -7091,7 +7091,7 @@ static void *xml_path(struct xml *node, char *path, int down) {
const char *(xml_string)(char *key) { const char *(xml_string)(char *key) {
struct xml *node = xml_path(*array_back(xml_docs), key, 0); struct xml *node = xml_path(*array_back(xml_docs), key, 0);
if( !node ) return "(null)"; if( !node ) return "";
if( strchr(key, '@') ) return (const char *)node; if( strchr(key, '@') ) return (const char *)node;
if( strchr(key, '$') ) return (const char *)node; if( strchr(key, '$') ) return (const char *)node;
return ""; return "";