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 <jim.mussared@gmail.com>
pull/571/head
sandyscott 2022-10-31 17:06:20 +00:00 zatwierdzone przez Jim Mussared
rodzic d6eb5b6f7e
commit 81c1408a07
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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: