Skip to content

Commit 80d1c9b

Browse files
committed
Fix incorrect bytes indexing.
1 parent 649db05 commit 80d1c9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/type1font.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _tokens(cls, text):
157157
if match:
158158
yield (tok_whitespace, match.group())
159159
pos = match.end()
160-
elif text[pos] == b'(':
160+
elif text[pos:pos+1] == b'(':
161161
start = pos
162162
pos += 1
163163
depth = 1
@@ -176,7 +176,7 @@ def _tokens(cls, text):
176176
elif text[pos:pos + 2] in (b'<<', b'>>'):
177177
yield (tok_delimiter, text[pos:pos + 2])
178178
pos += 2
179-
elif text[pos] == b'<':
179+
elif text[pos:pos+1] == b'<':
180180
start = pos
181181
pos = text.index(b'>', pos)
182182
yield (tok_string, text[start:pos])

0 commit comments

Comments
 (0)