From 7564931444e54a140420a23350e6b5c54774cc2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Thu, 15 Feb 2024 01:17:34 -0500
Subject: [PATCH] Some cleanup, no functional change.

---
 exec/fseditor.js | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/exec/fseditor.js b/exec/fseditor.js
index 550fc26aea..1f621b82e5 100644
--- a/exec/fseditor.js
+++ b/exec/fseditor.js
@@ -566,15 +566,14 @@ function erase_graphic_box()
 
 function shitty_inkey(mode, timeout)
 {
-	var b = console.inkey(mode|K_UTF8, timeout);
-	var ab;
+	var b = console.inkey(mode | K_UTF8, timeout);
+	var ab = ascii(b);
 	var bit;
 	var val;
 	var tmp;
 	var ret = b;
 	if (pmode & P_UTF8) {
-		ab = ascii(b);
-		if (ascii(b[0]) & 0x80) {
+		if (ab & 0x80) {
 			for (bit = 7; ab & (1<<bit); bit--)
 				val = ab & ((1<<bit) - 1);
 
-- 
GitLab