From 81c1408a0763940f9038e104aa38baa16c120acb Mon Sep 17 00:00:00 2001 From: sandyscott Date: Mon, 31 Oct 2022 17:06:20 +0000 Subject: [PATCH] aiorepl: Fix ordering of saving previous character. Duplicate Ctrl-C and LF detection requires this, but it was incorrectly saving the current value, not the previous. Signed-off-by: Jim Mussared --- micropython/aiorepl/aiorepl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micropython/aiorepl/aiorepl.py b/micropython/aiorepl/aiorepl.py index 36f601c3..62f54c5c 100644 --- a/micropython/aiorepl/aiorepl.py +++ b/micropython/aiorepl/aiorepl.py @@ -104,8 +104,8 @@ async def task(g=None, prompt="--> "): cmd = "" while True: b = await s.read(1) - c = ord(b) pc = c # save previous character + c = ord(b) pt = t # save previous time t = time.ticks_ms() if c < 0x20 or c > 0x7E: