Skip to content

Commit 327eedb

Browse files
author
Don Mahurin
committed
fix "from_bytes() missing required argument 'byteorder'"
1 parent e5d596e commit 327eedb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/low_level_api/low_level_api_chat_cpp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def output(self):
493493
# Contains multi-byte UTF8
494494
for num, pattern in [(2, 192), (3, 224), (4, 240)]:
495495
# Bitwise AND check
496-
if pattern & int.from_bytes(cur_char) == pattern:
496+
if pattern & int.from_bytes(cur_char, 'little') == pattern:
497497
self.multibyte_fix = [cur_char] + ([None] * (num-1))
498498

499499
# Stop incomplete bytes from passing

0 commit comments

Comments
 (0)