Skip to content

Changed sprintf to snprintf in MemoryOutStream::FormatToStream. #28

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

Conversation

pjohnmeyer
Copy link
Member

Removed trailing 'f' from floats and formatted all floats and doubles to '%0.6f'. This will address issue #18.

…ed trailing 'f' from floats and formatted all floats and doubles to '%0.6f'.
@ghost ghost assigned pjohnmeyer Feb 6, 2013
@pjohnmeyer
Copy link
Member Author

Leaving this one open for comment for a few days since I changed the output formatting for all floats. My other option was to use %30gf. In other words, MAXIMUM of 30 digits, expressed in the shortest form possible, with a trailing f for float (since shortest form would leave off trailing zeroes.) In the end I chose %0.6f as it resulted in the least change to current behavior.

pjohnmeyer added a commit that referenced this pull request Feb 9, 2013
Changed sprintf to snprintf in MemoryOutStream::FormatToStream. Fixes #18.
@pjohnmeyer pjohnmeyer merged commit e6c9311 into unittest-cpp:master Feb 9, 2013
@pjohnmeyer pjohnmeyer deleted the fixCheckEqualCrashForLargeNumbers branch February 9, 2013 03:04
pjohnmeyer added a commit that referenced this pull request Apr 4, 2015
Changed sprintf to snprintf in MemoryOutStream::FormatToStream. Fixes #18.
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.

1 participant