summaryrefslogtreecommitdiff
path: root/json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-04-26 21:40:39 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-04-26 21:40:39 -0400
commit2542668ccc6f715cee6f0cf74b6d9955a7a6d9ef (patch)
tree2814c6e5c4fefbc034545a03c38e7acdb05e33db /json.c
parentb8e01de8f94baa9e73af7d73375215fa6a3a762f (diff)
downloadgpsd-2542668ccc6f715cee6f0cf74b6d9955a7a6d9ef.tar.gz
Extended AIS idempotency test coverage to messages 22, 23, 24.
...and in doing so, fix a bug in AIS parsing.
Diffstat (limited to 'json.c')
-rw-r--r--json.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/json.c b/json.c
index a7a671c4..e191aac3 100644
--- a/json.c
+++ b/json.c
@@ -250,9 +250,12 @@ static int json_internal_read_object(const char *cp,
*pattr++ = '\0';
json_debug_trace((1, "Collected attribute name %s\n",
attrbuf));
- for (cursor = attrs; cursor->attribute != NULL; cursor++)
+ for (cursor = attrs; cursor->attribute != NULL; cursor++) {
+ json_debug_trace((2, "Checking against %s\n",
+ cursor->attribute));
if (strcmp(cursor->attribute, attrbuf) == 0)
break;
+ }
if (cursor->attribute == NULL) {
json_debug_trace((1,
"Unknown attribute name '%s' (attributes begin with '%s').\n",