diff --git a/include/nlohmann/detail/input/lexer.hpp b/include/nlohmann/detail/input/lexer.hpp index 1bac68bc4..bdeb610cf 100644 --- a/include/nlohmann/detail/input/lexer.hpp +++ b/include/nlohmann/detail/input/lexer.hpp @@ -934,7 +934,7 @@ class lexer : public lexer_base number_unsigned_t val = 0; const char* p = str; - while (*p >= '0' and * p <= '9') + while (*p >= '0' && * p <= '9') { val = (10U * val) + static_cast((*p - '0')); p++; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 49983b265..3530ebc3b 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -9039,7 +9039,7 @@ class lexer : public lexer_base number_unsigned_t val = 0; const char* p = str; - while (*p >= '0' and * p <= '9') + while (*p >= '0' && * p <= '9') { val = (10U * val) + static_cast((*p - '0')); p++;