vapor-community / postgresql

Robust PostgreSQL interface for Swift
MIT License
131 stars 33 forks source link

Numeric values like 0.0x are deserialized as 0.x0 #75

Closed tygriffin closed 6 years ago

tygriffin commented 6 years ago

When deserializing from the Postgres numeric datatype, values of the format 0.0x are coming out as 0.x0. So for example 0.08 is deserialized to 0.80.

tygriffin commented 6 years ago

https://github.com/vapor/postgresql appears to have the same issue.

vzsg commented 6 years ago

Fixed in #76 and version 2.1.2.

dmonagle commented 6 years ago

Hi @vzsg, my pleasure in catching this. I don't know if you are also involved in the vapor 3 code for postgresql, however the bug is also present there. Totally different code, but the same logic applies. I've opened a pull request over there too. If you aren't a reviewer over there, hopefully @tanner0101 or somebody similar can approve that one ASAP.

vzsg commented 6 years ago

Well, I can always get myself involved. I made a new point release there with your fix too, thanks.

(Funny thing, my very first contribution to Vapor was fixing the same number handling issue – in v1's JSON parsing.)