mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Properly save/restore cylinder description string
We saved it under the wrong name, and didn't restore it at all. Fix. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e58fa7b9b5
commit
85921592b0
2 changed files with 3 additions and 1 deletions
|
@ -658,6 +658,8 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
|
|||
return;
|
||||
if (MATCH(".cylinder.workpressure", pressure, &dive->cylinder[cylinder_index].type.workingpressure))
|
||||
return;
|
||||
if (MATCH(".cylinder.description", utf8_string, &dive->cylinder[cylinder_index].type.description))
|
||||
return;
|
||||
|
||||
if (MATCH(".o2", gasmix, &dive->cylinder[cylinder_index].gasmix.o2))
|
||||
return;
|
||||
|
|
|
@ -143,7 +143,7 @@ static void save_cylinder_info(FILE *f, struct dive *dive)
|
|||
if (volume)
|
||||
fprintf(f, " size='%u.%03u l'", FRACTION(volume, 1000));
|
||||
if (description)
|
||||
fprintf(f, " name='%s'", description);
|
||||
fprintf(f, " description='%s'", description);
|
||||
fprintf(f, " />\n");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue