Hash reading issue fixed

This commit is contained in:
Simon Rozman 2016-03-29 15:15:06 +02:00
parent 7410c6e611
commit 4ecd6260aa

View File

@ -242,11 +242,11 @@ int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In
// Read the hash. // Read the hash.
wxString content(elLocaleNote->GetNodeContent()); wxString content(elLocaleNote->GetNodeContent());
hash.resize(wxHexDecodedSize(content.length())); hash.resize(wxHexDecodedSize(content.length()));
size_t res = wxHexDecode(sig.data(), sig.capacity(), content, wxHexDecodeMode_SkipWS); size_t res = wxHexDecode(hash.data(), hash.capacity(), content, wxHexDecodeMode_SkipWS);
if (res != wxCONV_FAILED) if (res != wxCONV_FAILED)
sig.resize(res); hash.resize(res);
else else
sig.clear(); hash.clear();
} }
} }
} }