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

Fix issue #221: JSON_C_TO_STRING_NOSLASHESCAPE works incorrectly #222

Merged
merged 1 commit into from Apr 30, 2016

Conversation

chenha0
Copy link
Contributor

@chenha0 chenha0 commented Jan 21, 2016

The problem is caused by running json_escape_str with JSON_C_TO_STRING_NOSLASHESCAPE . In previous commits, the printbuf can be unnecessarily duplicated, as long as there are more than one slash in a single string.
I have fixed it by checking JSON_C_TO_STRING_NOSLASHESCAPE flag before the printbuf_memappend call.
And the tests are updated too.

@hawicz hawicz merged commit afa9f82 into json-c:master Apr 30, 2016
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.

None yet

2 participants