On 13/11/2018 10:46, osm@pinns wrote:
I forgot to check this with r4251 which indeed reports wrong linewidth!
Are you sure? I don't think it does!
You are right and it needs a check as the width is not saved
anywhere so it must be 32. Here is a patch to add the check.
Steve
Index: src/uk/me/parabola/mkgmap/typ/LineSection.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/typ/LineSection.java (revision 4251)
+++ src/uk/me/parabola/mkgmap/typ/LineSection.java (date 1542116445000)
@@ -12,6 +12,7 @@
*/
package uk.me.parabola.mkgmap.typ;
+import uk.me.parabola.imgfmt.app.typ.ColourInfo;
import uk.me.parabola.imgfmt.app.typ.TypData;
import uk.me.parabola.imgfmt.app.typ.TypLine;
import uk.me.parabola.mkgmap.scan.SyntaxException;
@@ -62,4 +63,14 @@
current.finish();
data.addLine(current);
}
+
+ protected void xpmCheck(TokenScanner scanner, ColourInfo colourInfo) {
+ int width = colourInfo.getWidth();
+
+ if (width == 0)
+ return;
+
+ if (width != 32)
+ throw new SyntaxException(scanner, "Line bitmaps must be 32 bits wide");
+ }
}
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev