[Tile-serving] [openstreetmap/osm2pgsql] Lua function errors now trigger runtime exception (#845)
mmd
notifications at github.com
Tue Jun 19 20:51:58 UTC 2018
Well, the code didn't really check, if the field contains a number. In many cases that's not really an issue if the value can be implicitly converted to a number. It fails though, when people use multiple values, like in `layer = 4;3`, or put in some other non-numeric value in there.
```lua
> print(5*"4")
20
> print(tonumber("4"))
4
```
```lua
> print(5*"4;3")
stdin:1: attempt to perform arithmetic on a string value
stack traceback:
stdin:1: in main chunk
[C]: in ?
> print(tonumber("4;3"))
nil
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/845#issuecomment-398541525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20180619/93c12f38/attachment.html>
More information about the Tile-serving
mailing list