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][JSON] Fix re-set locale after using yajl #4881

Merged
merged 1 commit into from
Jun 11, 2014

Conversation

ace20022
Copy link
Member

Calling setlocale more multiple times causes a dangling pointer.
This fix is related to 0a991b5 and a8fbc09

@ace20022
Copy link
Member Author

Ping @Montellese and @jmarshallnz
jenkins build this please

@MartijnKaijser MartijnKaijser added this to the Pending for inclusion milestone Jun 10, 2014
@t-nelson
Copy link
Contributor

Which platform? What documentation?

@ace20022
Copy link
Member Author

@Montellese
Copy link
Member

Ah so the value pointed to by the pointer returned by setlocale() is overwritten with another call to setlocale(). In that case currentLocale won't contain the proper value after the call to setlocale(LC_NUMERIC, "C"); and this change would fix that.

@ace20022
Copy link
Member Author

@Montellese yes, I should have made the description more precise :)

jmarshallnz added a commit that referenced this pull request Jun 11, 2014
[Fix][JSON] Fix re-set locale after using yajl
@jmarshallnz jmarshallnz merged commit 7bd0937 into xbmc:master Jun 11, 2014
@ace20022 ace20022 deleted the json_fix branch June 14, 2014 13:05
jmarshallnz added a commit to jmarshallnz/xbmc that referenced this pull request Jun 15, 2014
[Fix][JSON] Fix re-set locale after using yajl
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

5 participants