logo separator

[mkgmap-dev] [Patch v1] check length in substring style function

From Steve Ratcliffe steve at parabola.me.uk on Tue Dec 16 09:22:05 GMT 2014

Hi Gerd

> I forgot to answer this post from gbbickerton:
> "May i suggest  that a test is made to check that the string is long
> enough before applying this filter otherwise an exception occurs .It
> would be unsafe to use this filter in any style without such a test. "

Well remembered, thanks.

It could also do with some tests, I've attached some.

I would like to use SyntaxException instead of ExitException for
all cases where an error can be detected at compile time
in a style file.

I realise that ExitException was already used in that class.
PartFilter is the only other example I can see where it does
not use SyntaxException.

..Steve

-------------- next part --------------
A non-text attachment was scrubbed...
Name: substring-tests.patch
Type: text/x-patch
Size: 2200 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20141216/8d5e501c/attachment.bin>


More information about the mkgmap-dev mailing list