Skip to content

Fixing final write length for sendContent_P #880

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

Merged
merged 1 commit into from
Oct 17, 2015
Merged

Fixing final write length for sendContent_P #880

merged 1 commit into from
Oct 17, 2015

Conversation

JohnSL
Copy link
Contributor

@JohnSL JohnSL commented Oct 11, 2015

The memccpy_P function returns the first byte after the last character written into the destination. The current implantation of sendContent_P uses pointer arithmetic incorrectly:

contentUnitLen = contentNext - content;

The problem is that contentNext is relative to the destination, contentUnit, but content is in ROM. As a result, the number of remaining bytes is complete wrong.

Oh, and this is covered by issue 864 that I filed.

@JohnSL JohnSL mentioned this pull request Oct 12, 2015
igrr added a commit that referenced this pull request Oct 17, 2015
Fixing final write length for sendContent_P
@igrr igrr merged commit 9c31dbd into esp8266:esp8266 Oct 17, 2015
igrr added a commit that referenced this pull request Oct 29, 2015
Fixing final write length for sendContent_P
@JohnSL JohnSL deleted the sendContent_P-864 branch November 9, 2015 00:06
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.

2 participants