summaryrefslogtreecommitdiff
path: root/libgps_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-13 07:04:54 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-13 07:04:54 -0500
commit0dfc815a83d036fcdd027e331c77b7da330246e5 (patch)
treee0aa3538359cf1fa6a31f48703112f5354834186 /libgps_json.c
parent2f10b9bf538a60914558f87772a8072859449e73 (diff)
downloadgpsd-0dfc815a83d036fcdd027e331c77b7da330246e5.tar.gz
Last change to STARTSWITH was buggy. All regression tests pass.
Diffstat (limited to 'libgps_json.c')
-rw-r--r--libgps_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgps_json.c b/libgps_json.c
index e30c6e99..d7d0c671 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -395,7 +395,7 @@ int libgps_json_unpack(const char *buf,
if (classtag == NULL)
return -1;
-#define STARTSWITH(str, prefix) strncmp(str, prefix, strlen(prefix)-1)==0
+#define STARTSWITH(str, prefix) strncmp(str, prefix, strlen(prefix))==0
if (STARTSWITH(classtag, "\"class\":\"TPV\"")) {
status = json_tpv_read(buf, gpsdata, end);
gpsdata->status = STATUS_FIX;