From caeed6821cdc71a4005a58a9151a0bdb220f8c8a Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 11 Jan 2018 13:02:55 +0100 Subject: [PATCH] tweaks: reshuffle two condition series, to look better --- src/winio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/winio.c b/src/winio.c index 8d6ea17e..feb7bad7 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1290,8 +1290,8 @@ int get_byte_kbinput(int kbinput) case 2: /* The second digit (the 10's position) must be from zero to five * if the first was two, and may be any decimal value otherwise. */ - if (('0' <= kbinput && kbinput <= '5') || (byte < 200 && - '6' <= kbinput && kbinput <= '9')) + if ((byte < 200 && '0' <= kbinput && kbinput <= '9') || + ('0' <= kbinput && kbinput <= '5')) byte += (kbinput - '0') * 10; else retval = kbinput; @@ -1300,8 +1300,8 @@ int get_byte_kbinput(int kbinput) /* The third digit (the 1's position) must be from zero to five * if the first was two and the second was five, and may be any * decimal value otherwise. */ - if (('0' <= kbinput && kbinput <= '5') || (byte < 250 && - '6' <= kbinput && kbinput <= '9')) { + if ((byte < 250 && '0' <= kbinput && kbinput <= '9') || + ('0' <= kbinput && kbinput <= '5')) { byte += kbinput - '0'; /* The byte sequence is complete. */ retval = byte;