diff --git a/src/CBot/CBotInstr/CBotExprLitNum.cpp b/src/CBot/CBotInstr/CBotExprLitNum.cpp index 61978bf0..0e0f8f88 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNum.cpp @@ -74,8 +74,7 @@ CBotInstr* CompileExprLitNum(CBotToken* &p, CBotCStack* pStack) if (s.find('.') != std::string::npos || ( s.find('x') == std::string::npos && ( s.find_first_of("eE") != std::string::npos ) )) { double val = GetNumFloat(s); - if (val < static_cast(std::numeric_limits::min()) && - val > static_cast(std::numeric_limits::max()) ) + if (val > static_cast(std::numeric_limits::max())) { numtype = CBotTypDouble; inst = new CBotExprLitNum(val); @@ -89,8 +88,7 @@ CBotInstr* CompileExprLitNum(CBotToken* &p, CBotCStack* pStack) else { long val = GetNumInt(s); - if (val < std::numeric_limits::min() && - val > std::numeric_limits::max() ) + if (val > std::numeric_limits::max()) { numtype = CBotTypLong; inst = new CBotExprLitNum(val);