-
Notifications
You must be signed in to change notification settings - Fork 43
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
lvstring: fix size handling #538
lvstring: fix size handling #538
Conversation
- `size` is unnecessary and confusing (same as `length`) - `capacity` return value was wrong (off by one)
The chunk `size` is the allocated size minus one (the terminating `\0`).
The chunk `size` is the allocated size minus one (the terminating `\0`).
Looks like it is the case indeed. |
No, the The problem is setting
Yes, |
I meant it the other way around: |
Yes, and setting |
Same dilemna as in #543 (comment) in here. Waiting for a common decision :) |
- koreader/crengine#527 - koreader/crengine#528 - koreader/crengine#530 - koreader/crengine#531 - koreader/crengine#532 - koreader/crengine#533 - koreader/crengine#534 - koreader/crengine#535 - koreader/crengine#536 - koreader/crengine#538 - koreader/crengine#539 - koreader/crengine#540 - koreader/crengine#541 - koreader/crengine#542 - koreader/crengine#544
- koreader/crengine#527 - koreader/crengine#528 - koreader/crengine#530 - koreader/crengine#531 - koreader/crengine#532 - koreader/crengine#533 - koreader/crengine#534 - koreader/crengine#535 - koreader/crengine#536 - koreader/crengine#538 - koreader/crengine#539 - koreader/crengine#540 - koreader/crengine#541 - koreader/crengine#542 - koreader/crengine#544
The chunk
size
is the allocated size minus one (the terminating\0
). Fix methods that don't have the same definition.This change is