changeset 2110:5d372493ede1

Initialize match variables properly.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 10 Sep 2019 17:49:44 +0300
parents 828ccab450a5
children 793bb8848061
files mapsearch.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mapsearch.c	Tue Sep 10 17:32:43 2019 +0300
+++ b/mapsearch.c	Tue Sep 10 17:49:44 2019 +0300
@@ -1143,6 +1143,7 @@
                 // Okay, add the match to our list
                 MAPMatch *match = &matches[nmatches++];
 
+                match->marker = NULL;
                 match->map = info->locFile.continent;
                 match->mx = ox + 1 + centerX;
                 match->my = oy + 1 + centerY;
@@ -1365,6 +1366,7 @@
         LocMarker *marker = nearest[nloc];
         MAPMatch *match = &matches[nloc];
 
+        match->map = marker->file->continent;
         match->marker = marker;
         match->nname = 0;
         match->mx = marker->xc + 1;