changeset 1816:89829bd4122f

More map block parsing fixes.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 30 Oct 2017 03:01:22 +0200
parents 7ac487466456
children ad3fc99c5aa9
files mapsearch.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mapsearch.c	Mon Oct 30 02:53:05 2017 +0200
+++ b/mapsearch.c	Mon Oct 30 03:01:22 2017 +0200
@@ -494,14 +494,19 @@
         for (int xc = 0; xc < res->width; xc++)
         {
             if (offs < len)
-            {
                 dp[xc] = data[offs++];
-            }
+            else
+                goto out;
         }
+
         while (offs < len && data[offs] != '\n')
             offs++;
+
+        if (offs < len && data[offs] == '\n')
+            offs++;
     }
 
+out:
     return offs == len;
 }