mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Fixed critical bug in base2(1000)
Pull request #31 introduced a critical bug that caused calc to become unstable when base2(1000) was called. This patch fixes that bug.
This commit is contained in:
2
func.c
2
func.c
@@ -7897,7 +7897,7 @@ f_base2(int count, NUMBER **vals)
|
|||||||
oldbase = math_setmode2(MODE_HEX);
|
oldbase = math_setmode2(MODE_HEX);
|
||||||
break;
|
break;
|
||||||
case 1000:
|
case 1000:
|
||||||
oldbase = math_setmode(MODE_ENG);
|
oldbase = math_setmode2(MODE_ENG);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
math_error("Unsupported base");
|
math_error("Unsupported base");
|
||||||
|
Reference in New Issue
Block a user