Merge pull request #862

5dc09f2 wallet_rpc_server: fix some string values being returned between <> (moneromooo-monero)
f8213c0 Require 64/16 characters for payment ids (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2016-06-19 21:51:32 +02:00
commit 2072c642d1
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
2 changed files with 13 additions and 11 deletions

View file

@ -139,9 +139,11 @@ namespace string_tools
}
//----------------------------------------------------------------------------
template<class CharT>
bool parse_hexstr_to_binbuff(const std::basic_string<CharT>& s, std::basic_string<CharT>& res)
bool parse_hexstr_to_binbuff(const std::basic_string<CharT>& s, std::basic_string<CharT>& res, bool allow_partial_byte = false)
{
res.clear();
if (!allow_partial_byte && (s.size() & 1))
return false;
try
{
long v = 0;