changeset 2106:e7ab4a64a988

Add match->val to search backend result JSON.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 10 Sep 2019 17:09:36 +0300
parents 7da1e8aa541b
children c19d857cb001
files mapsearch.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mapsearch.c	Tue Sep 10 16:47:44 2019 +0300
+++ b/mapsearch.c	Tue Sep 10 17:09:36 2019 +0300
@@ -902,11 +902,12 @@
         if (type)
         {
             vstr = th_strdup_printf(
-                "%s[\"%s\",%d,%d,%d,%d]%s",
+                "%s[\"%s\",%d,%d,%d,%d,%d]%s",
                 vstart,
                 match->marker->file->continent,
                 match->mx, match->my,
                 match->wx, match->wy,
+                match->val,
                 vend);
 
             th_strbuf_puts(buf, &bufSize, bufLen, vstr);
@@ -915,13 +916,14 @@
         else
         {
             vstr = th_strdup_printf(
-                "%s[\"%s\",%d,%d,%d,%d,%d,%d,[",
+                "%s[\"%s\",%d,%d,%d,%d,%d,%d,%d,[",
                 vstart,
                 match->marker->file->continent,
                 match->mx, match->my,
                 match->wx, match->wy,
                 match->marker->flags,
-                match->nname);
+                match->nname,
+                match->val);
 
             th_strbuf_puts(buf, &bufSize, bufLen, vstr);
             th_free(vstr);