Skip to content

Commit 2adf6f3

Browse files
authored
Merge pull request #265 from dmahurin/fix-from-bytes-byteorder
fix "from_bytes() missing required argument 'byteorder'"
2 parents 34ad71f + 327eedb commit 2adf6f3

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
@@ -496,7 +496,7 @@ def output(self):
496496
# Contains multi-byte UTF8
497497
for num, pattern in [(2, 192), (3, 224), (4, 240)]:
498498
# Bitwise AND check
499-
if pattern & int.from_bytes(cur_char) == pattern:
499+
if pattern & int.from_bytes(cur_char, 'little') == pattern:
500500
self.multibyte_fix = [cur_char] + ([None] * (num-1))
501501

502502
# Stop incomplete bytes from passing

0 commit comments

Comments
 (0)