From 483302a2cdc3cc8f4854aecb9cb0ed841babe30c Mon Sep 17 00:00:00 2001 From: Vaxry Date: Fri, 17 Nov 2023 23:29:30 +0000 Subject: env: add HYPRLAND_NO_RT --- src/helpers/MiscFunctions.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/helpers/MiscFunctions.cpp') diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 85a81657..71263748 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -708,6 +708,10 @@ int64_t configStringToInt(const std::string& VALUE) { } else if (VALUE.starts_with("false") || VALUE.starts_with("off") || VALUE.starts_with("no")) { return 0; } + + if (VALUE.empty() || !isNumber(VALUE)) + return 0; + return std::stoll(VALUE); } -- cgit v1.2.3