panic in cpd.ValidUTF8
Lion34 opened this issue · comments
Stack trace:
"runtime error: index out of range [1024] with length 1024"
Stack:
3 0x00000000047c21e5 in github.com/softlandia/cpd.ValidUTF8
at /go/pkg/mod/github.com/softlandia/cpd@v0.0.0-20210117083209-2413526f2815/utf8.go:74
4 0x00000000047bfb15 in github.com/softlandia/cpd.CodepageDetect
at /go/pkg/mod/github.com/softlandia/cpd@v0.0.0-20210117083209-2413526f2815/cpd.go:49
This error occur when n, cp := testUTF8bitPattern(data[i]) returns n such i+n >= m (data contains not all bytes of multibyte utf8 char)
Хорошо, постараюсь на выходных пофиксить
… On 18 Feb 2022, at 12:23, Sergey Potapov ***@***.***> wrote:
Stack trace:
"runtime error: index out of range [1024] with length 1024"
Stack:
3 0x00000000047c21e5 in github.com/softlandia/cpd.ValidUTF8 <applewebdata://11B10682-B5AD-4B28-819E-2D9D475F81E4>
at /go/pkg/mod/github.com/softlandia/cpd ***@***.***/utf8.go:74 <applewebdata://11B10682-B5AD-4B28-819E-2D9D475F81E4>
4 0x00000000047bfb15 in github.com/softlandia/cpd.CodepageDetect <applewebdata://11B10682-B5AD-4B28-819E-2D9D475F81E4>
at /go/pkg/mod/github.com/softlandia/cpd ***@***.***/cpd.go:49 <applewebdata://11B10682-B5AD-4B28-819E-2D9D475F81E4>
This error occur when n, cp := testUTF8bitPattern(data[i]) returns n such i+n >= m (data contains not all bytes of multibyte utf8 char)
—
Reply to this email directly, view it on GitHub <#3>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIDJHCBZPLBPGKG2E3M47RDU3YFY7ANCNFSM5OXJOBBQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.
А можешь прислать строку которая вызывает панику -- запихаю её в тесты