Added support for size (not just s)

Fixes #3
This commit is contained in:
tastytea 2018-11-25 10:58:55 +01:00
parent 7efec890f7
commit e893a4066f
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.2)
project(libravatarserv
VERSION 0.2.4
VERSION 0.2.5
LANGUAGES CXX
)

View File

@ -67,6 +67,11 @@ int main()
{
size = static_cast<uint16_t>(std::stoul(digest.substr(pos_size + 2)));
}
pos_size = digest.find("size=", pos_digest);
if (pos_size != std::string::npos)
{
size = static_cast<uint16_t>(std::stoul(digest.substr(pos_size + 5)));
}
digest = digest.substr(0, pos_digest);
}