On 22/04/15 08:11, Gerd Petermann wrote:
Besides that the img file with defaults -1 is a bit smaller, so I think
we should change that in trunk (with the attached patch)

OK that would be safer.  I guess that no test showed up the problem
because both the Polish format and the tests make everything
initialized with -1, whereas I guess that the HousenumberGenerator did
not.  I think I will add a check to NetCheck for negative or zero
house numbers when read in, since they cannot be correct.

I would also like to add the following patch to the number preparer to
prevent any invalid number being used as a target in the
equalizeBases() method.

..Steve

Index: src/uk/me/parabola/imgfmt/app/net/NumberPreparer.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/imgfmt/app/net/NumberPreparer.java	(revision 3540)
+++ src/uk/me/parabola/imgfmt/app/net/NumberPreparer.java	(revision )
@@ -302,6 +302,9 @@
 				return true;
 			}
 
+			if (right.targetStart <= 0)
+				return false;
+
 			diff = right.targetStart - right.base;
 			if (left.tryStart(right.base + diff)) {
 				right.equalized = true;
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to