Skip to content

Commit

Permalink
SKA-403: fix advalues check regression
Browse files Browse the repository at this point in the history
  • Loading branch information
VKyllianAubry authored and GitHub Enterprise committed May 13, 2024
1 parent af36e63 commit 40a935f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions advalues/adapter/AdAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ auto AdAdapter::Serialize() -> std::vector<uint8_t>
}
case enum_uint8_t:
{
uint8_t value = isValidData<uint8_t, int64_t>(str);
uint8_t value = isValidData<uint8_t, uint64_t>(str);
serializer.Serialize(bufferFromChardevTo<uint16_t>(), 8);
break;
}
Expand Down Expand Up @@ -133,14 +133,14 @@ void AdAdapter::Deserialize(const std::vector<uint8_t>& bytes)
case enum_uint8_t:
{
std::stringstream ss;
ss << static_cast<int>(deserializer.Deserialize<int16_t>(8));
ss << static_cast<int>(deserializer.Deserialize<uint16_t>(8));
str = ss.str();
break;
}
case enum_int8_t:
{
std::stringstream ss;
ss << static_cast<int>(deserializer.Deserialize<uint16_t>(8));
ss << static_cast<int>(deserializer.Deserialize<int16_t>(8));
str = ss.str();
break;
}
Expand Down
2 changes: 1 addition & 1 deletion advalues/adapter/AdAdapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ auto AdAdapter::isValidData(const std::string& str) -> T
}
else if (std::is_unsigned_v<T>)
{
if (!isHexa)
if (isHexa)
{
value = std::stoull(str, nullptr, 0);
}
Expand Down

0 comments on commit 40a935f

Please sign in to comment.