Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
665ee70e
Unverified
Commit
665ee70e
authored
Nov 08, 2019
by
Rémi Verschelde
Committed by
GitHub
Nov 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #33376 from jamie-pate/master
Fix #24137 Different number of leading zeros on MINGW printf("%lg")
parents
6952fc47
bdb7adec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
ustring.cpp
core/ustring.cpp
+10
-0
No files found.
core/ustring.cpp
View file @
665ee70e
...
...
@@ -1337,7 +1337,17 @@ String String::num_scientific(double p_num) {
char
buf
[
256
];
#if defined(__GNUC__) || defined(_MSC_VER)
#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT)
// MinGW and old MSC require _set_output_format() to conform to C99 output for printf
unsigned
int
old_exponent_format
=
_set_output_format
(
_TWO_DIGIT_EXPONENT
);
#endif
snprintf
(
buf
,
256
,
"%lg"
,
p_num
);
#if (defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER < 1900)) && defined(_TWO_DIGIT_EXPONENT)
_set_output_format
(
old_exponent_format
);
#endif
#else
sprintf
(
buf
,
"%.16lg"
,
p_num
);
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment