mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 19:51:58 +01:00
NumberParser::parseUnsigned should not parse negative numbers
The function should abort if a negative number (e.g. "-123") is passed as input
This commit is contained in:
@@ -272,6 +272,12 @@ void NumberParserTest::testParseError()
|
||||
failmsg("must throw SyntaxException");
|
||||
} catch (SyntaxException&) { }
|
||||
|
||||
try
|
||||
{
|
||||
NumberParser::parseUnsigned("-123");
|
||||
failmsg("must throw SyntaxException");
|
||||
} catch (SyntaxException&) { }
|
||||
|
||||
try
|
||||
{
|
||||
NumberParser::parseHex("z23");
|
||||
|
||||
Reference in New Issue
Block a user