mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
🐛 long val was being cast to unsigned instead of signed
This commit is contained in:
parent
7ce3c0f7d4
commit
1048ed9353
1 changed files with 2 additions and 2 deletions
|
|
@ -15,13 +15,13 @@ template <typename T>
|
||||||
INLINE Json::Value JsonReturn(T &&val)
|
INLINE Json::Value JsonReturn(T &&val)
|
||||||
{
|
{
|
||||||
Json::Value res;
|
Json::Value res;
|
||||||
if constexpr (std::is_same_v<T, bool>)
|
if constexpr (std::is_same_v<T, int_fast8_t>)
|
||||||
{
|
{
|
||||||
res["value"] = (int)val; //becuase of json lib interpreting 67 as 'A' for example
|
res["value"] = (int)val; //becuase of json lib interpreting 67 as 'A' for example
|
||||||
}
|
}
|
||||||
else if constexpr (std::is_same_v<T, long>)
|
else if constexpr (std::is_same_v<T, long>)
|
||||||
{
|
{
|
||||||
res["value"] = (Json::UInt64)val;
|
res["value"] = (Json::Int64)val;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue