Skip to content
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

ef_log_read word aligned 判断错误 #150

Open
vince025 opened this issue Feb 20, 2023 · 2 comments
Open

ef_log_read word aligned 判断错误 #150

vince025 opened this issue Feb 20, 2023 · 2 comments

Comments

@vince025
Copy link

EfErrCode ef_log_read(size_t index, uint32_t *log, size_t size)

if (size % 4 == 0) {
EF_DEBUG("Error: size must be word aligned.");
return EF_READ_ERR;
}
应该改为
if (size % 4 != 0) {
EF_DEBUG("Error: size must be word aligned.");
return EF_READ_ERR;
}

@vince025
Copy link
Author

同样的:
if (index < cur_using_size) {
也要更改为:
if (index >= cur_using_size) {

@SnowSakuraKo
Copy link

遇到了相同的报错

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

No branches or pull requests

2 participants