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

Redundant judgment exists in es_addChar #18

Open
PuzzleZz opened this issue Feb 27, 2023 · 0 comments
Open

Redundant judgment exists in es_addChar #18

PuzzleZz opened this issue Feb 27, 2023 · 0 comments

Comments

@PuzzleZz
Copy link

When you call this interface to add a single character to a character string, you need to check whether lenBuf is sufficient. However, lenStr cannot be greater than lenBuf.
Change if((*ps)->lenStr >= (*ps)->lenBuf) to if((*ps)->lenStr == (*ps)->lenBuf) for better understanding

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

1 participant