mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[CALC] Fix input bug when display is in error. (#5988)
CORE-19191 Reproduce the same behaviour of the calculator for Windows XP when an error condition is met. When the result is NaN and it cannot be printed, the error condition is cleared by pressing the CLEAR button.
This commit is contained in:
parent
2a2556c5d0
commit
605fa32d45
1 changed files with 2 additions and 1 deletions
|
@ -1635,7 +1635,7 @@ static INT_PTR CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
|||
case IDC_BUTTON_D:
|
||||
case IDC_BUTTON_E:
|
||||
case IDC_BUTTON_F:
|
||||
calc.is_nan = FALSE;
|
||||
if (calc.is_nan) break;
|
||||
build_operand(hWnd, LOWORD(wp));
|
||||
return TRUE;
|
||||
case IDC_BUTTON_PERCENT:
|
||||
|
@ -1701,6 +1701,7 @@ static INT_PTR CALLBACK DlgMainProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
|||
}
|
||||
return TRUE;
|
||||
case IDC_BUTTON_BACK:
|
||||
if (calc.is_nan) break;
|
||||
if (calc.sci_in) {
|
||||
if (calc.esp == 0) {
|
||||
TCHAR *ptr;
|
||||
|
|
Loading…
Reference in a new issue