mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-14 00:38:20 +01:00
parent
a9d098990e
commit
67c1a8a3bc
@ -134,7 +134,7 @@ bool UUID::tryParse(const std::string& uuid)
|
||||
bool haveHyphens = false;
|
||||
if (uuid[8] == '-' && uuid[13] == '-' && uuid[18] == '-' && uuid[23] == '-')
|
||||
{
|
||||
if (uuid.size() >= 36)
|
||||
if (uuid.size() == 36)
|
||||
haveHyphens = true;
|
||||
else
|
||||
return false;
|
||||
|
@ -92,6 +92,15 @@ void UUIDTest::testParse()
|
||||
catch (Poco::SyntaxException&)
|
||||
{
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
uuid.parse("495cff3a-a4b3-11ee-9e54-9cb6d0f68b51AA");
|
||||
fail("invalid UUID - must throw");
|
||||
}
|
||||
catch (Poco::SyntaxException&)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user