diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 55c0df44..d28566ef 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -1528,11 +1528,18 @@ var button = func(btn, i, event = "") { if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "-") { mcdu_scratchpad.scratchpads[i].clear(); mcdu_scratchpad.scratchpads[i].addChar("+"); + } else if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "+") { + mcdu_scratchpad.scratchpads[i].clear(); + mcdu_scratchpad.scratchpads[i].addChar("-"); } else { mcdu_scratchpad.scratchpads[i].addChar("-"); } } else if (btn == "OVFY") { - mcdu_scratchpad.scratchpads[i].addChar("@"); + if (mcdu_scratchpad.scratchpads[i].scratchpad == "") { + mcdu_scratchpad.scratchpads[i].addChar("@"); + } else { + mcdu_message(i, "NOT ALLOWED"); + } } else { mcdu_scratchpad.scratchpads[i].addChar(btn); }