8000 fix stream regex limitation · guidebee/micropython@14dd165 · GitHub
[go: up one dir, main page]

Skip to content

Commit 14dd165

Browse files
committed
fix stream regex limitation
1 parent 176024f commit 14dd165

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ports/stm32/modules/mpc/streams.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,12 @@ def feed(self, data):
358358
offset = 0
359359
while offset < length:
360360
if taking_plain_text:
361-
match = match_text(data, offset)
361+
old_offset = offset
362+
match = match_text(data[old_offset:])
362363
if match:
363364
start, offset = match.span()
365+
offset += old_offset
366+
start += old_offset
364367
draw(data[start:offset])
365368
else:
366369
taking_plain_text = False

0 commit comments

Comments
 (0)
0