Skip to content
Snippets Groups Projects
Commit a95a0342 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

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
......@@ -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::<u64>());
let a = ap.get::<f64>();
w.write_fmt(format_args!("{}", a));
......
......@@ -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;
}
Subproject commit 4762a184501beedbb58ea218f0c84fea85685c35
Subproject commit 1945668b2fc6e96c498003dce700ebaf95108fac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment