Skip to content

Commit f3fe825

Browse files
committed
Fix for 32-bit Windows
1 parent d04708d commit f3fe825

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/support.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ function fast_check_string(beg::Ptr{UInt8}, len)
345345
elseif ch < 0xe0
346346
# 2-byte UTF-8 sequence (i.e. characters 0x80-0x7ff)
347347
(pnt += 1) < fin || strerror(StrErrors.SHORT, pnt - beg, ch)
348-
(ch > 0xc1 && checkcont(pnt)) || strerror(StrErrors.INVALID, pnt - beg, ch)
348+
checkcont(pnt) || strerror(StrErrors.INVALID, pnt - beg - 1, ch)
349+
ch > 0xc1 || strerror(StrErrors.LONG, pnt - beg - 1, get_utf8_2byte(pnt, ch))
349350
ch > 0xc3 ? (num2byte += 1) : (latin1byte += 1)
350351
elseif ch < 0xf0
351352
# 3-byte UTF-8 sequence (i.e. characters 0x800-0xffff)

0 commit comments

Comments
 (0)