1
0
mirror of synced 2024-11-14 11:07:43 +01:00

fix: Floating point finding not working with negative values

This commit is contained in:
WerWolv 2022-12-18 14:17:57 +01:00
parent ad85a4a0e3
commit da8ec1565e

View File

@ -161,7 +161,7 @@ namespace hex::plugin::builtin {
if (result.ec != std::errc() || result.ptr != string.data() + string.size())
return { false, { }, 0 };
if (value < std::numeric_limits<Type>::min() || value > std::numeric_limits<Type>::max())
if (value < std::numeric_limits<Type>::lowest() || value > std::numeric_limits<Type>::max())
return { false, { }, 0 };
return { true, value, sizeof(Type) };