TerminalEmulator: fix bug in DECRQM handling

Reported in https://github.com/termux/termux-app/issues/1752
This commit is contained in:
Henrik Grimler
2020-09-12 21:23:33 +02:00
parent 216cc10f3c
commit 8faa5b2151

View File

@@ -748,7 +748,7 @@ public final class TerminalEmulator {
value = (mScreen == mAltBuffer) ? 1 : 2;
} else {
int internalBit = mapDecSetBitToInternalBit(mode);
if (internalBit == -1) {
if (internalBit != -1) {
value = isDecsetInternalBitSet(internalBit) ? 1 : 2; // 1=set, 2=reset.
} else {
Log.e(EmulatorDebug.LOG_TAG, "Got DECRQM for unrecognized private DEC mode=" + mode);