Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5644d50

Browse files
authored
Fix crash due to invalid length to unsafe_wrap (#41)
1 parentf658892 commit5644d50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/StringEncodings.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ function fill_buffer!(s::StringDecoder)
322322
@staticifVERSION>=v"1.6.0-DEV.438"
323323
inbuf_view=view(s.inbuf,Int(s.inbytesleft[]+1):BUFSIZE)
324324
else
325-
inbuf_view=unsafe_wrap(Array,pointer(s.inbuf, s.inbytesleft[]+1), BUFSIZE)
325+
inbuf_view=unsafe_wrap(Array,pointer(s.inbuf, s.inbytesleft[]+1), BUFSIZE-s.inbytesleft[])
326326
end
327327
s.inbytesleft[]+=readbytes!(s.stream, inbuf_view)
328328
iconv!(s.cd, s.inbuf, s.outbuf, s.inbufptr, s.outbufptr, s.inbytesleft, s.outbytesleft)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp