summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2021-03-16 17:47:23 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2021-03-16 17:47:23 (EDT)
commit4063cd1de882d76f7cccfc107f5ace35010e93e9 (patch)
treecb3a3340062f106068b00998572047e0645faa8b
parent024f90bb8a3771aa4f2c142687d6421060b5f987 (diff)
downloaddodge-balls-4063cd1de882d76f7cccfc107f5ace35010e93e9.zip
dodge-balls-4063cd1de882d76f7cccfc107f5ace35010e93e9.tar.gz
dodge-balls-4063cd1de882d76f7cccfc107f5ace35010e93e9.tar.bz2
db_games_find(): Print trimmed XML char data
-rw-r--r--src/game.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game.c b/src/game.c
index 12e8519..0103332 100644
--- a/src/game.c
+++ b/src/game.c
@@ -89,13 +89,12 @@ _db_game_xml_cdata(void *pv, const char *s, int len)
s_z = s_z_trimmed = strndup(s, len);
- db_dbg(" %s [CDATA]", s_z);
-
while(isspace(*s_z_trimmed)) {
++s_z_trimmed;
--len;
}
if (*s_z_trimmed == '\0') {
+ db_dbg(" (null)");
free(s_z);
return;
}
@@ -105,6 +104,7 @@ _db_game_xml_cdata(void *pv, const char *s, int len)
}
*(s_z_trimmed_end + 1) = '\0';
+ db_dbg(" %s", s_z_trimmed);
if (*data != NULL && **data != '\0') {
old_data = *data;
sprintf(*data, "%s %s", *data, strdup(s_z_trimmed));