diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-01 07:16:59 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-03-01 08:02:21 -0800 |
commit | 36422d2f9ee1856bec35892338845af85034190b (patch) | |
tree | 844fb5ca08973bdfdbb6404a56a190936c343c97 /save-xml.c | |
parent | c3b3ab9af72bda7144bbbee3d00c485838e9ceba (diff) | |
download | subsurface-36422d2f9ee1856bec35892338845af85034190b.tar.gz |
Fix saving of po2 values
It was very broken, although it just happened to work for the values
dirk had in his own XML file (0 and 0.800 bar). Because of confusion
with number of digits it would save 1.080 bar as 1.80 bar.
Use our "show_milli()" helper for showing things that are in milli-units
(which is what we tend to use for most of our values: mK, mbar, mm, ml)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r-- | save-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/save-xml.c b/save-xml.c index 0685c9fd1..a23fb10a3 100644 --- a/save-xml.c +++ b/save-xml.c @@ -366,7 +366,7 @@ static void save_sample(FILE *f, struct sample *sample, struct sample *old) } if (sample->po2 != old->po2) { - fprintf(f, " po2='%u.%2u bar'", FRACTION(sample->po2, 1000)); + show_milli(f, " po2='", sample->po2, " bar", "'"); old->po2 = sample->po2; } fprintf(f, " />\n"); |