Clara icon indicating copy to clipboard operation
Clara copied to clipboard

Parsing arguments with trailing garbage should fail

Open mjerabek opened this issue 6 years ago • 1 comments

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.

mjerabek avatar Apr 24 '18 14:04 mjerabek

Fixed in Lyra library with this change https://github.com/bfgroup/Lyra/commit/cdd5a924160402e7fb94736103e40cb64e0e27b1

grafikrobot avatar Dec 04 '19 22:12 grafikrobot