diff --git a/Utilities/Config.cpp b/Utilities/Config.cpp index ef11e4260b..8f261c1483 100644 --- a/Utilities/Config.cpp +++ b/Utilities/Config.cpp @@ -103,7 +103,13 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string::format) f try { - const auto val = std::stoull(value, nullptr, 0); + std::size_t pos; + const auto val = std::stoull(value, &pos, 0); + + if (pos != value.size()) + { + return false; + } if (out) *out = val; return true;