test: Add test for embedded null in hex string

Also, fix style in the corresponding function. The style change can be
reviewed with "--word-diff-regex=."
This commit is contained in:
MarcoFalke
2021-11-09 20:17:48 +01:00
committed by MacroFake
parent f0a834e2f1
commit fabdf81983
2 changed files with 9 additions and 2 deletions

View File

@@ -78,7 +78,6 @@ bool IsHexNumber(std::string_view str)
std::vector<unsigned char> ParseHex(std::string_view str)
{
// convert hex dump to vector
std::vector<unsigned char> vch;
auto it = str.begin();
while (it != str.end() && it + 1 != str.end()) {