tweaks: reshuffle some lines, to better separate the three cases

master
Benno Schulenberg 2020-07-22 11:07:20 +02:00
parent 93b2877758
commit 364a1518de
1 changed files with 8 additions and 4 deletions

View File

@ -845,12 +845,16 @@ int assemble_byte_code(int keycode)
{
static int byte = 0;
/* The first digit is either 0, 1, or 2 (which has been checked before
* the call. The second digit may be at most 5 if the first was 2. */
if (++digit_count == 1) {
digit_count++;
/* The first digit is either 0, 1, or 2 (checked before the call). */
if (digit_count == 1) {
byte = (keycode - '0') * 100;
return PROCEED;
} else if (digit_count == 2) {
}
/* The second digit may be at most 5 if the first was 2. */
if (digit_count == 2) {
if (byte < 200 || keycode <= '5') {
byte += (keycode - '0') * 10;
return PROCEED;