mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-12 14:51:16 -03:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user