From a3ce3221fdd5edbd234675a2e8cbbc58dc16d11c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 9 Jun 2014 11:23:05 -0700 Subject: Fix incorrect argument order for %.*f Strangely, *prinf() on Linux appears to do the right thing in either order (my guess is based on the type of the two values?), but on Windows things go badly. Signed-off-by: Dirk Hohndel --- planner.c | 2 +- profile.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/planner.c b/planner.c index fce004e02..b4400a88b 100644 --- a/planner.c +++ b/planner.c @@ -651,7 +651,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool snprintf(buffer + len, sizeof(buffer) - len, translate("gettextFromC", "Warning: " "high pO2 value %.2f at %d:%02u with gas %s at depth %.*f %s
"), - pO2 / 1000.0, FRACTION(dp->time, 60), gasname(&dp->gasmix), depth_value, decimals, depth_unit); + pO2 / 1000.0, FRACTION(dp->time, 60), gasname(&dp->gasmix), decimals, depth_value, depth_unit); } } dp = dp->next; diff --git a/profile.c b/profile.c index db7a101f6..b40ef628c 100644 --- a/profile.c +++ b/profile.c @@ -1251,7 +1251,7 @@ static void plot_string(struct plot_info *pi, struct plot_data *entry, struct me put_format(b, translate("gettextFromC", "V: %.1f%s\n"), speedvalue, vertical_speed_unit); sacvalue = get_volume_units(entry->sac, &decimals, &unit); if (entry->sac && prefs.show_sac) - put_format(b, translate("gettextFromC", "SAC: %.*f%s/min\n"), sacvalue, decimals, unit); + put_format(b, translate("gettextFromC", "SAC: %.*f%s/min\n"), decimals, sacvalue, unit); if (entry->cns) put_format(b, translate("gettextFromC", "CNS: %u%%\n"), entry->cns); if (prefs.pp_graphs.po2) -- cgit v1.2.3-70-g09d2