Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Parsing arguments with trailing garbage should fail #62

Open
mjerabek opened this issue Apr 24, 2018 · 1 comment
Open

Parsing arguments with trailing garbage should fail #62

mjerabek opened this issue Apr 24, 2018 · 1 comment

Comments

@mjerabek
Copy link

Integer arguments with trailing garbage are successfully decoded instead of giving an error:
42garbage is decoded as 42 instead of parse error

This will be also a problem for other types. I looked at the implementation and the fix should be quite simple -- just checking if the stringstream is empty after the conversion.

@grafikrobot
Copy link

Fixed in Lyra library with this change bfgroup/Lyra@cdd5a92

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants