# HG changeset patch # User Matti Hamalainen # Date 1509325282 -7200 # Node ID 89829bd4122f242c970f0c161ecb1af6cc4fcadc # Parent 7ac4874664568779a7091fc049d4f68864d43375 More map block parsing fixes. diff -r 7ac487466456 -r 89829bd4122f mapsearch.c --- 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; }