[muparser] ParserInt::IsBinVal to return false on overflow

Instead of throwing an exception, simply return false. It is too
complicated to thread the error return through this function and
ParserInt is unused by fish anyways.
This commit is contained in:
ridiculousfish
2017-11-24 23:53:26 -08:00
parent 67a6f756f2
commit bceef6c125

View File

@@ -162,7 +162,8 @@ int ParserInt::IsBinVal(const char_type *a_szExpr, int *a_iPos, value_type *a_fV
if (i == 0) return 0;
if (i == iBits) throw exception_type(_T("Binary to integer conversion error (overflow)."));
// return false on overflow
if (i == iBits) return 0;
*a_fVal = (unsigned)(iVal >> (iBits - i));
*a_iPos += i + 1;