Skip to content

Commit 81c1408

Browse files
sandyscottjimmo
authored andcommitted
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 <[email protected]>
1 parent d6eb5b6 commit 81c1408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: micropython/aiorepl/aiorepl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ async def task(g=None, prompt="--> "):
104104
cmd = ""
105105
while True:
106106
b = await s.read(1)
107-
c = ord(b)
108107
pc = c # save previous character
108+
c = ord(b)
109109
pt = t # save previous time
110110
t = time.ticks_ms()
111111
if c < 0x20 or c > 0x7E:

0 commit comments

Comments
 (0)