Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Limkilde Svendsen
relibc
Commits
a95a0342
Commit
a95a0342
authored
7 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Fix issues by adding support for floating point values in va_list
parent
56e304a2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/stdio/src/printf.rs
+1
-1
1 addition, 1 deletion
src/stdio/src/printf.rs
tests/atof.c
+1
-1
1 addition, 1 deletion
tests/atof.c
va_list
+1
-1
1 addition, 1 deletion
va_list
with
3 additions
and
3 deletions
src/stdio/src/printf.rs
+
1
−
1
View file @
a95a0342
...
...
@@ -36,7 +36,7 @@ pub unsafe fn printf<W: fmt::Write>(mut w: W, format: *const c_char, mut ap: VaL
found_percent
=
false
;
}
'f'
|
'F'
=>
{
let
a
:
f64
=
mem
::
transmute
(
ap
.get
::
<
u
64
>
()
)
;
let
a
=
ap
.get
::
<
f
64
>
();
w
.write_fmt
(
format_args!
(
"{}"
,
a
));
...
...
This diff is collapsed.
Click to expand it.
tests/atof.c
+
1
−
1
View file @
a95a0342
...
...
@@ -2,7 +2,7 @@
#include
<stdio.h>
int
main
(
int
argc
,
char
*
argv
[])
{
double
d
=
atof
(
"
1.0
"
);
double
d
=
atof
(
"
-3.14
"
);
printf
(
"%f
\n
"
,
d
);
return
0
;
}
This diff is collapsed.
Click to expand it.
va_list
@
1945668b
Compare
4762a184
...
1945668b
Subproject commit
4762a184501beedbb58ea218f0c84fea85685c35
Subproject commit
1945668b2fc6e96c498003dce700ebaf95108fac
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment