diff --git a/subprojects/wf-utils/wayfire/lexer/literal.cpp b/subprojects/wf-utils/wayfire/lexer/literal.cpp index cf4c9cf..5e8a042 100644 --- a/subprojects/wf-utils/wayfire/lexer/literal.cpp +++ b/subprojects/wf-utils/wayfire/lexer/literal.cpp @@ -3,6 +3,7 @@ #include #include #include +#include namespace wf { @@ -86,7 +87,7 @@ variant_t parse_literal(const std::string &s) } // Deal with float or double here. - if (s.find('.') != std::string::npos) + if (std::count(std::begin(s), std::end(s), '.') == 1) { // Float or Double. if ((s.find('f') != std::string::npos) || (s.find('F') != std::string::npos))