mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
profile: fix string formating in profile.cpp
ae299d5e66
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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue