profile: fix string formating in profile.cpp
ae299d5e663cd672d1114c3fe90cf026b9ab463e introduced a format- string bug by splitting a format-string in two and splitting the arguments at the wrong place. The compiler doesn't warn in this case, because the format- string is passed through translate(...). This should have crashed, but for some reason didn't, at least on Linux. Fix the arguments. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
af6caa6fa2
commit
32a08735c3
@ -1368,8 +1368,8 @@ static std::vector<std::string> plot_string(const struct dive *d, const struct p
|
||||
std::vector<std::string> res;
|
||||
|
||||
depthvalue = get_depth_units(entry->depth, NULL, &depth_unit);
|
||||
res.push_back(casprintf_loc(translate("gettextFromC", "@: %d:%02d"), FRACTION(entry->sec, 60), depthvalue));
|
||||
res.push_back(casprintf_loc(translate("gettextFromC", "D: %.1f%s"), depth_unit));
|
||||
res.push_back(casprintf_loc(translate("gettextFromC", "@: %d:%02d"), FRACTION(entry->sec, 60)));
|
||||
res.push_back(casprintf_loc(translate("gettextFromC", "D: %.1f%s"), depthvalue, depth_unit));
|
||||
for (cyl = 0; cyl < pi->nr_cylinders; cyl++) {
|
||||
int mbar = get_plot_pressure(pi, idx, cyl);
|
||||
if (!mbar)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user