Skip to content

修复 #148 #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

修复 #148 #149

wants to merge 5 commits into from

Conversation

ExquisiteCore
Copy link
Contributor

Fixes #148

ExquisiteCore and others added 5 commits October 7, 2024 13:22
在Reader的多个方法中添加了对缓冲区边界和读取错误的检查,确保在数据不足或读取失败时返回安全值。同时,新增了测试文件reader_test.go,验证了空缓冲区、不完整数据、错误Reader等情况下的行为。
通过使用unsafe.Slice直接读取数据到变量中,避免了额外的内存分配和拷贝操作,从而提高了ReadU8函数的性能。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PROBLEM] 这个panic有人遇到过吗?
1 participant